FlutterLogin class

Inheritance

Constructors

FlutterLogin({Key? key, SignupCallback? onSignup, required LoginCallback onLogin, required RecoverCallback onRecoverPassword, String? title, LoginMessages? messages, LoginTheme? theme, FormFieldValidator<String>? userValidator, bool? validateUserImmediately, FormFieldValidator<String>? passwordValidator, VoidCallback? onSubmitAnimationCompleted, String? logoTag, LoginUserType userType = LoginUserType.email, String? titleTag, bool showDebugButtons = false, List<LoginProvider> loginProviders = const <LoginProvider>[], bool hideForgotPasswordButton = false, bool loginAfterSignUp = true, String? footer, bool hideProvidersTitle = false, List<UserFormField>? additionalSignupFields, bool disableCustomPageTransformer = false, bool navigateBackAfterRecovery = false, List<TermOfService> termsOfService = const <TermOfService>[], ConfirmRecoverCallback? onConfirmRecover, ConfirmSignupCallback? onConfirmSignup, ConfirmSignupRequiredCallback? confirmSignupRequired, SignupCallback? onResendCode, String savedEmail = '', String savedPassword = '', AuthMode initialAuthMode = AuthMode.login, List<Widget>? children, bool scrollable = false, TextInputType? confirmSignupKeyboardType, Widget? headerWidget, BeforeAdditionalFieldsCallback? onSwitchToAdditionalFields})

Properties

additionalSignupFields List<UserFormField>?
This List contains the additional signup fields. By setting this, after signup another card with a form for additional user data is shown
final
children List<Widget>?
Supply custom widgets to the auth stack such as a custom logo widget
final
confirmSignupKeyboardType TextInputType?
Sets TextInputType of sign up confirmation form.
final
confirmSignupRequired ConfirmSignupRequiredCallback?
final
disableCustomPageTransformer bool
Disable the page transformation between switching authentication modes. Fixes #97 if disabled. https://github.com/NearHuscarl/flutter_login_fix/issues/97
final
Optional footer text for example a copyright notice
final
hashCode int
The hash code for this object.
no setterinherited
headerWidget Widget?
A widget that can be placed on top of the loginCard.
final
hideForgotPasswordButton bool
Set to true to hide the Forgot Password button
final
hideProvidersTitle bool
Hide the title above the login providers. If no providers are set this is uneffective
final
initialAuthMode AuthMode
The initial auth mode for the widget to show. This defaults to AuthMode.login if not specified. This field can allow you to show the sign up state by default.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loginAfterSignUp bool
Set to false to return back to sign in page after successful sign up
final
loginProviders List<LoginProvider>
list of LoginProvider each have an icon and a callback that will be Called when the user hit the provider icon button if not specified nothing will be shown
final
The image provider for the logo image to be displayed
final
logoTag String?
Hero tag for logo image. If not specified, it will simply fade out when changing route
final
messages LoginMessages?
Describes all of the labels, text hints, button texts and other auth descriptions
final
Navigate back to the login screen after recovery of password.
final
onConfirmRecover ConfirmRecoverCallback?
Called when the user submits confirmation code in recover password mode Optional
final
onConfirmSignup ConfirmSignupCallback?
Called when the user hits the submit button when in confirm signup mode Optional
final
onLogin LoginCallback
Called when the user hit the submit button when in login mode
final
onRecoverPassword RecoverCallback
Called when the user hit the submit button when in recover password mode
final
onResendCode SignupCallback?
Called when the user hits the resend code button in confirm signup mode Only when onConfirmSignup is set
final
onSignup SignupCallback?
Called when the user hit the submit button when in sign up mode
final
onSubmitAnimationCompleted VoidCallback?
Called after the submit animation's completed. Put your route transition logic here. Recommend to use with logoTag and titleTag
final
onSwitchToAdditionalFields BeforeAdditionalFieldsCallback?
Called when the user hit the submit button when in sign up mode, before additionalSignupFields are shown Optional
final
passwordValidator FormFieldValidator<String>?
Same as userValidator but for password
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savedEmail String
Prefilled (ie. saved from previous session) value at startup for username (Auth class calls username email, therefore we use savedEmail here aswell)
final
savedPassword String
Prefilled (ie. saved from previous session) value at startup for password (applies both to Auth class password and confirmation password)
final
scrollable bool
If set to true, make the login window scrollable when overflowing instead of resizing the window. Default: false
final
showDebugButtons bool
Display the debug buttons to quickly forward/reverse login animations. In release mode, this will be overrided to false regardless of the value passed in
final
termsOfService List<TermOfService>
List of terms of service to be listed during registration. On onSignup callback LoginData contains a list of TermOfServiceResult
final
theme LoginTheme?
FlutterLogin's theme. If not specified, it will use the default theme as shown in the demo gifs and use the colorsheme in the closest Theme widget
final
title String?
The large text above the login Card, usually the app or company name
final
titleTag String?
Hero tag for title text. Need to specify LoginTheme.beforeHeroFontSize and LoginTheme.afterHeroFontSize if you want different font size before and after hero animation
final
userType LoginUserType
LoginUserType can be email, name or phone, by default is email. It will change how the edit text autofill and behave accordingly to your choice
final
userValidator FormFieldValidator<String>?
Email validating logic, Returns an error string to display if the input is invalid, or null otherwise
final
validateUserImmediately bool?
Should email be validated after losing focus true or after form submissions false. Default: false
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<FlutterLogin>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

defaultEmailValidator(String? value) String?
defaultPasswordValidator(String? value) String?