LoginOptions constructor
const
LoginOptions({ - Widget? image,
- Widget? title = const Text('Log in', style: TextStyle(color: Color(0xff71C6D1), fontWeight: FontWeight.w800, fontSize: 24)),
- Widget? subtitle,
- double? maxFormWidth,
- TextStyle? emailTextStyle,
- TextStyle? passwordTextStyle,
- TextAlign? emailTextAlign,
- TextAlign? passwordTextAlign,
- InputDecoration emailDecoration = const InputDecoration(contentPadding: EdgeInsets.symmetric(horizontal: 8), labelText: 'Email address', border: OutlineInputBorder(), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Color(0xff71C6D1))), labelStyle: TextStyle(color: Colors.black, fontWeight: FontWeight.w400, fontSize: 16)),
- InputDecoration passwordDecoration = const InputDecoration(contentPadding: EdgeInsets.symmetric(horizontal: 8), labelText: 'Password', border: OutlineInputBorder(), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Color(0xff71C6D1))), labelStyle: TextStyle(color: Colors.black, fontWeight: FontWeight.w400, fontSize: 16)),
- String initialEmail = '',
- String initialPassword = '',
- LoginSpacerOptions spacers = const LoginSpacerOptions(spacerBeforeTitle: 8, spacerAfterTitle: 2, formFlexValue: 2),
- LoginTranslations translations = const LoginTranslations(),
- ValidationService? validationService,
- ButtonBuilder loginButtonBuilder = _createLoginButton,
- ButtonBuilder forgotPasswordButtonBuilder = _createForgotPasswordButton,
- ButtonBuilder requestForgotPasswordButtonBuilder = _createRequestForgotPasswordButton,
- ButtonBuilder registrationButtonBuilder = _createRegisterButton,
- InputContainerBuilder emailInputContainerBuilder = _createEmailInputContainer,
- InputContainerBuilder passwordInputContainerBuilder = _createPasswordInputContainer,
- bool showObscurePassword = true,
- ForgotPasswordSpacerOptions forgotPasswordSpacerOptions = const ForgotPasswordSpacerOptions(spacerAfterButton: 3, spacerBeforeTitle: 1),
- Color loginBackgroundColor = const Color(0xffFAF9F6),
- Color forgotPasswordBackgroundColor = const Color(0xffFAF9F6),
- Padding forgotPasswordScreenPadding = const Padding(padding: EdgeInsets.symmetric(horizontal: 60)),
- AppBar? forgotPasswordCustomAppBar,
})
Implementation
const LoginOptions({
this.image,
this.title = const Text(
'Log in',
style: TextStyle(
color: Color(0xff71C6D1),
fontWeight: FontWeight.w800,
fontSize: 24,
),
),
this.subtitle,
this.maxFormWidth,
this.emailTextStyle,
this.passwordTextStyle,
this.emailTextAlign,
this.passwordTextAlign,
this.emailDecoration = const InputDecoration(
contentPadding: EdgeInsets.symmetric(horizontal: 8),
labelText: 'Email address',
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xff71C6D1),
),
),
labelStyle: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w400,
fontSize: 16,
),
),
this.passwordDecoration = const InputDecoration(
contentPadding: EdgeInsets.symmetric(horizontal: 8),
labelText: 'Password',
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xff71C6D1),
),
),
labelStyle: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w400,
fontSize: 16,
),
),
this.initialEmail = '',
this.initialPassword = '',
this.spacers = const LoginSpacerOptions(
spacerBeforeTitle: 8,
spacerAfterTitle: 2,
formFlexValue: 2,
),
this.translations = const LoginTranslations(),
this.validationService,
this.loginButtonBuilder = _createLoginButton,
this.forgotPasswordButtonBuilder = _createForgotPasswordButton,
this.requestForgotPasswordButtonBuilder =
_createRequestForgotPasswordButton,
this.registrationButtonBuilder = _createRegisterButton,
this.emailInputContainerBuilder = _createEmailInputContainer,
this.passwordInputContainerBuilder = _createPasswordInputContainer,
this.showObscurePassword = true,
this.forgotPasswordSpacerOptions = const ForgotPasswordSpacerOptions(
spacerAfterButton: 3,
spacerBeforeTitle: 1,
),
this.loginBackgroundColor = const Color(0xffFAF9F6),
this.forgotPasswordBackgroundColor = const Color(0xffFAF9F6),
this.forgotPasswordScreenPadding = const Padding(
padding: EdgeInsets.symmetric(horizontal: 60),
),
this.forgotPasswordCustomAppBar,
});