Email Confirmation and refactor for snackbar
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
part of 'card.dart';
|
||||
|
||||
|
||||
class _SignupConfirmationResendButton extends StatelessWidget {
|
||||
final bool canResend;
|
||||
final bool isResending;
|
||||
final String resendLabel;
|
||||
final VoidCallback onResend;
|
||||
|
||||
const _SignupConfirmationResendButton({
|
||||
required this.canResend,
|
||||
required this.isResending,
|
||||
required this.resendLabel,
|
||||
required this.onResend,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return ElevatedButton.icon(
|
||||
onPressed: canResend ? onResend : null,
|
||||
icon: isResending
|
||||
? SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
),
|
||||
)
|
||||
: const Icon(Icons.mark_email_read_outlined),
|
||||
label: Text(resendLabel),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user