sneaky email verification fix

This commit is contained in:
Arseni
2026-02-05 02:54:13 +03:00
parent 0ce90eef21
commit 81ffdd4291
6 changed files with 266 additions and 81 deletions

View File

@@ -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,
);