mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-07 08:04:04 +01:00
Reformat the whole codebase with 100 line width (#3403)
This commit is contained in:
@@ -115,7 +115,6 @@ class TOTPEnterCode extends StatefulWidget {
|
||||
required this.isClosable,
|
||||
});
|
||||
|
||||
|
||||
final Setup2FAViewModel setup2FAViewModel;
|
||||
final bool isForSetup;
|
||||
final bool isClosable;
|
||||
@@ -154,7 +153,6 @@ class _TOTPEnterCodeState extends State<TOTPEnterCode> {
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
BaseTextFormField(
|
||||
textAlign: TextAlign.left,
|
||||
hintText: S.current.totp_code,
|
||||
@@ -180,15 +178,17 @@ class _TOTPEnterCodeState extends State<TOTPEnterCode> {
|
||||
return PrimaryButton(
|
||||
isDisabled: widget.setup2FAViewModel.enteredOTPCode.length != 8,
|
||||
onPressed: () async {
|
||||
final result =
|
||||
await widget.setup2FAViewModel.totp2FAAuth(totpController.text, widget.isForSetup);
|
||||
final bannedState = widget.setup2FAViewModel.state is AuthenticationBanned;
|
||||
final result = await widget.setup2FAViewModel
|
||||
.totp2FAAuth(totpController.text, widget.isForSetup);
|
||||
final bannedState =
|
||||
widget.setup2FAViewModel.state is AuthenticationBanned;
|
||||
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return PopUpCancellableAlertDialog(
|
||||
contentText: _textDisplayedInPopupOnResult(result, bannedState, context),
|
||||
contentText:
|
||||
_textDisplayedInPopupOnResult(result, bannedState, context),
|
||||
actionButtonText: S.of(context).ok,
|
||||
buttonAction: () {
|
||||
result ? widget.setup2FAViewModel.success() : null;
|
||||
|
||||
@@ -25,12 +25,11 @@ class PopUpCancellableAlertDialog extends StatelessWidget {
|
||||
contentText,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user