FlutterLogin constructor

FlutterLogin({
  1. Key? key,
  2. SignupCallback? onSignup,
  3. required LoginCallback onLogin,
  4. required RecoverCallback onRecoverPassword,
  5. String? title,
  6. LoginMessages? messages,
  7. LoginTheme? theme,
  8. FormFieldValidator<String>? userValidator,
  9. bool? validateUserImmediately,
  10. FormFieldValidator<String>? passwordValidator,
  11. VoidCallback? onSubmitAnimationCompleted,
  12. String? logoTag,
  13. LoginUserType userType = LoginUserType.email,
  14. String? titleTag,
  15. bool showDebugButtons = false,
  16. List<LoginProvider> loginProviders = const <LoginProvider>[],
  17. bool hideForgotPasswordButton = false,
  18. bool loginAfterSignUp = true,
  19. String? footer,
  20. bool hideProvidersTitle = false,
  21. List<UserFormField>? additionalSignupFields,
  22. bool disableCustomPageTransformer = false,
  23. bool navigateBackAfterRecovery = false,
  24. List<TermOfService> termsOfService = const <TermOfService>[],
  25. ConfirmRecoverCallback? onConfirmRecover,
  26. ConfirmSignupCallback? onConfirmSignup,
  27. ConfirmSignupRequiredCallback? confirmSignupRequired,
  28. SignupCallback? onResendCode,
  29. String savedEmail = '',
  30. String savedPassword = '',
  31. AuthMode initialAuthMode = AuthMode.login,
  32. List<Widget>? children,
  33. bool scrollable = false,
  34. TextInputType? confirmSignupKeyboardType,
  35. Widget? headerWidget,
  36. BeforeAdditionalFieldsCallback? onSwitchToAdditionalFields,
  37. String? initialIsoCode,
  38. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
})

Implementation

FlutterLogin({
  super.key,
  this.onSignup,
  required this.onLogin,
  required this.onRecoverPassword,
  this.title,

  /// The [ImageProvider] or asset path [String] for the logo image to be displayed
  dynamic logo,
  this.messages,
  this.theme,
  this.userValidator,
  this.validateUserImmediately,
  this.passwordValidator,
  this.onSubmitAnimationCompleted,
  this.logoTag,
  this.userType = LoginUserType.email,
  this.titleTag,
  this.showDebugButtons = false,
  this.loginProviders = const <LoginProvider>[],
  this.hideForgotPasswordButton = false,
  this.loginAfterSignUp = true,
  this.footer,
  this.hideProvidersTitle = false,
  this.additionalSignupFields,
  this.disableCustomPageTransformer = false,
  this.navigateBackAfterRecovery = false,
  this.termsOfService = const <TermOfService>[],
  this.onConfirmRecover,
  this.onConfirmSignup,
  this.confirmSignupRequired,
  this.onResendCode,
  this.savedEmail = '',
  this.savedPassword = '',
  this.initialAuthMode = AuthMode.login,
  this.children,
  this.scrollable = false,
  this.confirmSignupKeyboardType,
  this.headerWidget,
  this.onSwitchToAdditionalFields,
  this.initialIsoCode,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
})  : assert((logo is String?) || (logo is ImageProvider?)),
      logo = logo is String ? AssetImage(logo) : logo as ImageProvider?;