Email Confirmation and refactor for snackbar

This commit is contained in:
Arseni
2026-01-27 14:42:52 +03:00
parent e5cd0c9433
commit be1d678c42
28 changed files with 958 additions and 173 deletions

View File

@@ -13,19 +13,18 @@ Future<void> invokeAndNotify<T>(
void Function(Object)? onError,
void Function(T)? onSuccess,
}) async {
final sm = ScaffoldMessenger.of(context);
final locs = AppLocalizations.of(context)!;
try {
final res = await operation();
if (operationSuccess != null) {
notifyUserX(sm, operationSuccess);
await notifyUser(context, operationSuccess);
}
if (onSuccess != null) {
onSuccess(res);
}
} catch (e) {
notifyUserOfErrorX(
scaffoldMessenger: sm,
context: context,
errorSituation: operationError ?? locs.errorInternalError,
exception: e,
appLocalizations: locs,