Change error prompts

This commit is contained in:
problematicconsumer
2023-08-26 17:01:51 +03:30
parent f393020a31
commit 2ecb781f60
15 changed files with 88 additions and 48 deletions

View File

@@ -24,13 +24,12 @@ class ConnectionButton extends HookConsumerWidget {
connectivityControllerProvider,
(_, next) {
if (next case AsyncError(:final error)) {
CustomToast.error(t.presentError(error)).show(context);
CustomAlertDialog.fromErr(t.presentError(error)).show(context);
}
if (next
case AsyncData(value: Disconnected(:final connectionFailure?))) {
CustomAlertDialog(
message: connectionFailure.present(t),
).show(context);
CustomAlertDialog.fromErr(t.presentError(connectionFailure))
.show(context);
}
},
);