LoginOptions constructor

const LoginOptions({
  1. Widget? image,
  2. Widget? title = const Text('Log in', style: TextStyle(color: Color(0xff71C6D1), fontWeight: FontWeight.w800, fontSize: 24)),
  3. Widget? subtitle,
  4. double? maxFormWidth,
  5. TextStyle? emailTextStyle,
  6. TextStyle? passwordTextStyle,
  7. TextAlign? emailTextAlign,
  8. TextAlign? passwordTextAlign,
  9. 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)),
  10. 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)),
  11. String initialEmail = '',
  12. String initialPassword = '',
  13. LoginSpacerOptions spacers = const LoginSpacerOptions(spacerBeforeTitle: 8, spacerAfterTitle: 2, formFlexValue: 2),
  14. LoginTranslations translations = const LoginTranslations(),
  15. ValidationService? validationService,
  16. ButtonBuilder loginButtonBuilder = _createLoginButton,
  17. ButtonBuilder forgotPasswordButtonBuilder = _createForgotPasswordButton,
  18. ButtonBuilder requestForgotPasswordButtonBuilder = _createRequestForgotPasswordButton,
  19. ButtonBuilder registrationButtonBuilder = _createRegisterButton,
  20. InputContainerBuilder emailInputContainerBuilder = _createEmailInputContainer,
  21. InputContainerBuilder passwordInputContainerBuilder = _createPasswordInputContainer,
  22. bool showObscurePassword = true,
  23. ForgotPasswordSpacerOptions forgotPasswordSpacerOptions = const ForgotPasswordSpacerOptions(spacerAfterButton: 3, spacerBeforeTitle: 1),
  24. Color loginBackgroundColor = const Color(0xffFAF9F6),
  25. Color forgotPasswordBackgroundColor = const Color(0xffFAF9F6),
  26. Padding forgotPasswordScreenPadding = const Padding(padding: EdgeInsets.symmetric(horizontal: 60)),
  27. 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,
});