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

@@ -0,0 +1,77 @@
part of 'card.dart';
class _SignupConfirmationContent extends StatelessWidget {
final String? email;
final String description;
final bool canResend;
final String resendLabel;
final bool isResending;
final VoidCallback onResend;
const _SignupConfirmationContent({
required this.email,
required this.description,
required this.canResend,
required this.resendLabel,
required this.isResending,
required this.onResend,
});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final colorScheme = theme.colorScheme;
final locs = AppLocalizations.of(context)!;
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: colorScheme.primary.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(14),
),
child: Icon(
Icons.mark_email_read_outlined,
color: colorScheme.primary,
),
),
const VSpacer(),
Text(
locs.signupConfirmationTitle,
textAlign: TextAlign.center,
style: theme.textTheme.headlineSmall?.copyWith(
fontWeight: FontWeight.w700,
),
),
const VSpacer(),
Text(
description,
textAlign: TextAlign.center,
style: theme.textTheme.bodyMedium,
),
if (email != null && email!.isNotEmpty) ...[
const VSpacer(),
_SignupConfirmationEmailBadge(email: email!),
],
const VSpacer(multiplier: 1.5),
Wrap(
spacing: 12,
runSpacing: 12,
alignment: WrapAlignment.center,
children: [
_SignupConfirmationResendButton(
canResend: canResend,
isResending: isResending,
resendLabel: resendLabel,
onResend: onResend,
),
],
),
],
);
}
}