Skip to content

Instantly share code, notes, and snippets.

@VB10
Last active November 23, 2021 00:40
Show Gist options
  • Select an option

  • Save VB10/97de3de5a68a12c703ecff34412479bd to your computer and use it in GitHub Desktop.

Select an option

Save VB10/97de3de5a68a12c703ecff34412479bd to your computer and use it in GitHub Desktop.
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