Last active
November 23, 2021 00:40
-
-
Save VB10/97de3de5a68a12c703ecff34412479bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Scaffold( | |
| appBar: AppBar(backgroundColor: Colors.transparent, elevation: 0, systemOverlayStyle: SystemUiOverlayStyle.dark), | |
| body: Padding( | |
| padding: context.paddingMedium, | |
| child: Form( | |
| key: formValidateKey, | |
| autovalidateMode: isAutoValidate ? AutovalidateMode.always : AutovalidateMode.disabled, | |
| child: Column( | |
| crossAxisAlignment: CrossAxisAlignment.start, | |
| children: [ | |
| const Spacer(flex: 2), | |
| Text(_LoginKeys.welcome.rawValue, style: context.textTheme.headline4), | |
| Text(_LoginKeys.signInDetail.rawValue, style: context.textTheme.subtitle2), | |
| const Spacer(), | |
| EmailFormField(label: _LoginKeys.email.rawValue, textEditingController: loginTextController), | |
| PasswordFormField(label: _LoginKeys.password.rawValue, textEditingController: passwordTextController), | |
| Align( | |
| alignment: Alignment.centerRight, | |
| child: TextButton(onPressed: () {}, child: Text(_LoginKeys.forgot.rawValue))), | |
| const Divider(), | |
| ElevatedButton( | |
| style: ElevatedButton.styleFrom(shape: const StadiumBorder()), | |
| onPressed: isServiceLoading | |
| ? null | |
| : () { | |
| controlUser(loginTextController.text, passwordTextController.text); | |
| }, | |
| child: Text(_LoginKeys.signin.rawValue)), | |
| const Spacer(flex: 4), | |
| ], | |
| ), | |
| ), | |
| ), | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment