sneaky email verification fix
This commit is contained in:
@@ -11,12 +11,14 @@ class ErrorPage extends StatelessWidget {
|
||||
final String title;
|
||||
final String errorMessage;
|
||||
final String errorHint;
|
||||
final Widget? action;
|
||||
|
||||
const ErrorPage({
|
||||
super.key,
|
||||
const ErrorPage({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.errorMessage,
|
||||
required this.errorMessage,
|
||||
required this.errorHint,
|
||||
this.action,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -26,19 +28,34 @@ class ErrorPage extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.error_outline, size: 72, color: Theme.of(context).colorScheme.error),
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
size: 72,
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
const VSpacer(),
|
||||
Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(color: Theme.of(context).colorScheme.error),
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const VSpacer(multiplier: 0.5),
|
||||
ListTile(
|
||||
title: Text(errorMessage, textAlign: TextAlign.center, style: Theme.of(context).textTheme.titleLarge),
|
||||
subtitle: Text(errorHint, textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodySmall),
|
||||
title: Text(
|
||||
errorMessage,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
subtitle: Text(
|
||||
errorHint,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
),
|
||||
const VSpacer(multiplier: 1.5),
|
||||
if (action != null) ...[action!, const VSpacer(multiplier: 0.5)],
|
||||
TextButton(
|
||||
onPressed: () => navigate(context, Pages.root),
|
||||
child: Text(AppLocalizations.of(context)!.goToMainPage),
|
||||
@@ -54,8 +71,10 @@ Widget exceptionToErrorPage({
|
||||
required String title,
|
||||
required String errorMessage,
|
||||
required Object exception,
|
||||
Widget? action,
|
||||
}) => ErrorPage(
|
||||
title: title,
|
||||
errorMessage: errorMessage,
|
||||
title: title,
|
||||
errorMessage: errorMessage,
|
||||
errorHint: ErrorHandler.handleError(context, exception),
|
||||
action: action,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user