Some checks failed
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
33 lines
970 B
Dart
33 lines
970 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:pweb/generated/i18n/app_localizations.dart';
|
|
import 'package:pweb/providers/two_factor.dart';
|
|
|
|
|
|
class ResendCodeButton extends StatelessWidget {
|
|
const ResendCodeButton({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
final localizations = AppLocalizations.of(context)!;
|
|
|
|
return TextButton(
|
|
onPressed: () => context.read<TwoFactorProvider>().resendCode(),
|
|
style: TextButton.styleFrom(
|
|
padding: EdgeInsets.zero,
|
|
minimumSize: const Size(0, 0),
|
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
alignment: Alignment.centerLeft,
|
|
foregroundColor: theme.colorScheme.primary,
|
|
textStyle: theme.textTheme.bodyMedium?.copyWith(
|
|
decoration: TextDecoration.underline,
|
|
),
|
|
),
|
|
child: Text(localizations.twoFactorResend),
|
|
);
|
|
}
|
|
}
|