LoginTemplate class

Inheritance

Constructors

LoginTemplate({Key? key, EdgeInsets padding = const EdgeInsets.only(top: 24, bottom: 16, left: 16, right: 16), bool forceFullHeight = true, required bool authenticating, required void onLogin(String email, String password), bool canSubmit = true, bool centerHead = false, bool centerFields = true, Alignment forgotPasswordAlignment = Alignment.centerLeft, Widget forgotPasswordBuilder(BuildContext context, Widget child)?, bool hideFieldsLabel = false, @Deprecated("Please use instead: 'spaceBetweenIconAndTitle'") double? spaceBetweenIconAndWelcome, double spaceBetweenIconAndTitle = 25, @Deprecated("Please use instead: 'spaceBetweenWelcomeAndSubtitle'") double? spaceBetweenWelcomeAndDescription, double spaceBetweenWelcomeAndSubtitle = 0, double spaceBetweenHeadAndFields = 40, double spaceBetweenFields = 40, double spaceBetweenFieldsAndButton = 50, @Deprecated("Please use instead: 'titleText'") String? welcomeText, String? titleText, @Deprecated("Please use instead: 'descriptionText'") String? descriptionText, String? subtitleText, String? buttonText, String? signUpLegendText, String? emailFieldHintText, String? passwordFieldHintText, Widget? icon, @Deprecated("Please use instead 'titleTextColor'") Color? welcomeTextColor, Color? titleTextColor, @Deprecated("Please use instead 'descriptionTextColor'") Color? descriptionTextColor, Color? subtitleTextColor, Color? legendTextColor, TextStyle? legendNormalStyle, TextStyle? legendActionStyle, Widget? loginOptions, void onForgotPasswordTap()?, void onHaveAccountLegendTap()?, ButtonSize? buttonSize, List<WidgetStateProperty<Color>>? buttonColors, Widget mainButtonBuilder(Widget defaultCta, dynamic callback(), bool submitting, GBUiKitLocalizations localizations, bool isDisabled)?, Widget titleBuilder(GBUiKitLocalizations localizations)?, Widget subtitleBuilder(GBUiKitLocalizations localizations)?, bool wrapInSafeArea = true, bool centerTitles = false, String? emailLabel, String? passwordLabel, WrapWidgetBuilder? haveAnAccountBuilder, String? emailValue, String? passwordValue, InputDecoration? emailFieldInputDecoration, InputDecoration passwordFieldInputDecoration(BuildContext context, Widget icon)?, bool haveAnAccountActionUppercase = true, bool submitOnKeyboardAction = false})
const

Properties

authenticating bool
Flag to specify if the UI should show a loading CTA
final
buttonColors List<WidgetStateProperty<Color>>?
Specify custom color for main CTA button
final
buttonSize ButtonSize?
Specify type of main CTA button size default ButtonSize.large
final
buttonText String?
Sign in button text
final
canSubmit bool
Specify whether to disable or not the CTA
final
centerFields bool
Will center the email and password fields
final
centerHead bool
If icon, welcomeText and descriptionText will be center
final
centerTitles bool
Specify if should center titles
final
emailFieldHintText String?
The hint text shown in the email field
final
emailFieldInputDecoration InputDecoration?
Override default input decoration with your own implementation for email field
final
emailLabel String?
Pass a custom email string label
final
emailValue String?
Provide a way to change the email field input value
final
forceFullHeight bool
final
forgotPasswordAlignment Alignment
Define the Forgot your password? legend
final
forgotPasswordBuilder Widget Function(BuildContext context, Widget child)?
Define a custom builder for the forgot passwords builder Provides acces to the default widget definition
final
hashCode int
The hash code for this object.
no setterinherited
haveAnAccountActionUppercase bool
Define if have an account action text should be uppercase Defaults to true
final
haveAnAccountBuilder WrapWidgetBuilder?
Define a custom builder for the have an account legend builder Provides access to the default widget definition
final
hideFieldsLabel bool
If true, Email and Password labels will be hidden
final
icon Widget?
Widget which is placed at the top
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
legendActionStyle TextStyle?
The Style to apply to the haveAccount legend normal text
final
legendNormalStyle TextStyle?
The Style to apply to the haveAccount legend normal text
final
legendTextColor Color?
The color applied to the haveAccount legend action color
final
loginOptions Widget?
Widget to allow sign in with other options
final
mainButtonBuilder Widget Function(Widget defaultCta, dynamic callback(), bool submitting, GBUiKitLocalizations localizations, bool isDisabled)?
Provides a way to customize the way the main button is rendered defaultCta provides you access to the default widget (useful if you just want to wrap or place other widgets aside the default) callback provides a callback to be used on your custom button 'onTap' implementation, this way the widget can trigger onLogin callback properly submitting bool to indicate if the widget is busy localizations provides you access to default localizations isDisabled bool to indicate if the button should be disabled (when fields are empty)
final
onForgotPasswordTap → void Function()?
final
onHaveAccountLegendTap → void Function()?
final
onLogin → void Function(String email, String password)
final
padding EdgeInsets
final
passwordFieldHintText String?
The hint text shown in the password field
final
passwordFieldInputDecoration InputDecoration Function(BuildContext context, Widget icon)?
Override default input decoration with your own implementation for password field
final
passwordLabel String?
Pass a custom password string label
final
passwordValue String?
Provide a way to change the password field input value
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signUpLegendText String?
Custom text to show in sign up legend
final
spaceBetweenFields double
Empty space between email and password fields
final
spaceBetweenFieldsAndButton double
Empty space between fields and sign in button
final
spaceBetweenHeadAndFields double
Empty space between the head content and the rest of content
final
spaceBetweenIconAndTitle double
Empty space between icon and welcomeText
final
spaceBetweenWelcomeAndSubtitle double
Empty space between welcomeText and descriptionText @Deprecated("Please use ispaceBetweenWelcomeAndSubtitlenstead ''") double? spaceBetweenWelcomeAndDescription,
final
submitOnKeyboardAction bool
Flag to enable keyboard action behavior for form submission When true, pressing Enter will move focus between fields or submit the form based on field values and focus state
final
subtitleBuilder Widget Function(GBUiKitLocalizations localizations)?
Provides a way to customize the way the subtitle localizations provides you access to default localizations
final
subtitleText String?
The H3 text
final
subtitleTextColor Color?
The H3 text color
final
titleBuilder Widget Function(GBUiKitLocalizations localizations)?
Provides a way to customize the way the title localizations provides you access to default localizations
final
titleText String?
The H1 text
final
titleTextColor Color?
The H1 text color
final
wrapInSafeArea bool
If should wrap in safe area By default true
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<LoginTemplate>
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, int wrapWidth = 65}) 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