Change error prompts
This commit is contained in:
@@ -67,7 +67,7 @@ class HomePage extends HookConsumerWidget {
|
||||
_ => const EmptyProfilesHomeBody(),
|
||||
},
|
||||
AsyncError(:final error) =>
|
||||
SliverErrorBodyPlaceholder(t.presentError(error)),
|
||||
SliverErrorBodyPlaceholder(t.printError(error)),
|
||||
_ => const SliverToBoxAdapter(),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user