LoginTemplateStyle class
LoginTemplateStyle defines style for every single components of every pages. There are LoginTemplateSignInPage, LoginTemplateSignUpPage, LoginTemplateConfirmCodePage, LoginTemplateForgotPasswordPage, LoginTemplateCreatePasswordPage {@tool snippet} This is a sample of a LoginTemplateStyle.
LoginTemplateStyle(
primary: Color(0xffffab00),
primaryDark: Color(0xffc67c00),
primaryLight: Color(0xffffdd4b),
buttonOverlay: Colors.black12,
inlineButtonStyle: ButtonStyle(
shape: MaterialStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(_kBorderRadius),
)),
padding: MaterialStateProperty.all<EdgeInsets>(
EdgeInsets.symmetric(horizontal: 2)),
elevation: MaterialStateProperty.all<double>(0),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
backgroundColor:
MaterialStateProperty.all<Color>(Colors.transparent),
overlayColor: MaterialStateProperty.all<Color>(_kColorPrimaryLight),
minimumSize: MaterialStateProperty.all<Size>(Size.zero),
),
textFieldTextStyle: const TextStyle(
fontSize: _kFontSizeNormal,
color: _kColorTextDark,
),
screenPadding: const EdgeInsets.all(22),
verticalSpacingBetweenComponents: 10,
verticalSpacingBetweenSubComponents: 6,
verticalSpacingBetweenGroup: 22,
inlineButtonTextStyle: const TextStyle(
color: _kColorTextMedium,
fontSize: _kFontSizeMedium,
),
buttonTextStyle: const TextStyle(
color: _kColorTextLight,
fontSize: _kFontSizeNormal,
),
messageTextStyle: const TextStyle(
fontSize: _kFontSizeMedium,
color: Colors.black45,
),
socialButtonTextStyle: const TextStyle(
color: _kColorTextDark,
fontSize: _kFontSizeNormal,
),
itemShadow: const BoxShadow(
color: Colors.black12,
offset: Offset(2, 2),
blurRadius: 7,
spreadRadius: 2,
),
buttonStyle: ButtonStyle(
shape: MaterialStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(_kBorderRadius),
)),
padding: MaterialStateProperty.all<EdgeInsets>(
EdgeInsets.symmetric(vertical: 8, horizontal: 16)),
elevation: MaterialStateProperty.all<double>(7),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
backgroundColor: MaterialStateProperty.all<Color>(_kColorPrimary),
overlayColor:
MaterialStateProperty.all<Color>(_kColorButtonOverlay),
minimumSize: MaterialStateProperty.all<Size>(
Size(_kButtonMinHeight, _kButtonMinHeight)),
),
socialButtonStyle: ButtonStyle(
shape: MaterialStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(_kBorderRadius),
)),
padding: MaterialStateProperty.all<EdgeInsets>(
EdgeInsets.symmetric(vertical: 8, horizontal: 16)),
elevation: MaterialStateProperty.all<double>(7.0),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
backgroundColor: MaterialStateProperty.all<Color>(_kColorTextLight),
overlayColor:
MaterialStateProperty.all<Color>(_kColorButtonOverlay),
minimumSize: MaterialStateProperty.all<Size>(
Size(_kButtonMinHeight, _kButtonMinHeight)),
),
textFieldHintTextStyle: const TextStyle(
fontSize: _kFontSizeNormal,
color: _kColorTextMedium,
),
textFieldErrorTextStyle: const TextStyle(
fontSize: _kFontSizeSmall,
color: Colors.redAccent,
),
textFieldPadding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
)
{@end-tool}
Constructors
- LoginTemplateStyle({required TextStyle textFieldHintTextStyle, required TextStyle textFieldErrorTextStyle, required ButtonStyle socialButtonStyle, required EdgeInsets screenPadding, required double verticalSpacingBetweenComponents, required double verticalSpacingBetweenSubComponents, required double verticalSpacingBetweenGroup, required TextStyle inlineButtonTextStyle, required TextStyle buttonTextStyle, required TextStyle messageTextStyle, required TextStyle socialButtonTextStyle, required BoxShadow itemShadow, required TextStyle textFieldTextStyle, required ButtonStyle inlineButtonStyle, required Color primary, required Color primaryDark, required Color primaryLight, required Color buttonOverlay, required ButtonStyle buttonStyle, required EdgeInsets textFieldPadding})
- Constructor
Properties
-
Overlay color when pressed on a button.
final
-
The style of ElevatedButton widget that is used for normal cases.
final
-
The style of Text widget of a normal button that placed in a page.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inlineButtonStyle → ButtonStyle
-
The style of ElevatedButton widget that placed inline a RichText.
final
- inlineButtonTextStyle → TextStyle
-
The style of Text widget of a button that placed inline a RichText.
final
- itemShadow → BoxShadow
-
The shadow is used for the TextField of else.
final
- messageTextStyle → TextStyle
-
The style of Text widget is used to display as a message.
final
- primary → Color
-
Primary color
final
- primaryDark → Color
-
Primary dark color
final
- primaryLight → Color
-
Primary light color
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenPadding → EdgeInsets
-
The padding from the border ơf screen to a page.
final
-
The style of ElevatedButton widget is used for sign in/up by a social account. See also socialButtonTextStyle
final
-
The style of Text widget of a button that is used for sign in/up by a social account (Ex: Facebook, AppleId,...).
final
- textFieldErrorTextStyle → TextStyle
-
The style of error of TextField widget.
final
- textFieldHintTextStyle → TextStyle
-
The style of hint of TextField widget.
final
- textFieldPadding → EdgeInsets
-
The padding of a TextField.
final
- textFieldTextStyle → TextStyle
-
The style of TextField widget.
final
- verticalSpacingBetweenComponents → double
-
The vertical spacing between each components in a page.
final
- verticalSpacingBetweenGroup → double
-
The vertical spacing between each group of components in a page.
final
- verticalSpacingBetweenSubComponents → double
-
The vertical spacing between each child components in a component in a page.
final
Methods
-
copyWith(
{EdgeInsets? screenPadding, double? verticalSpacingBetweenComponents, double? verticalSpacingBetweenSubComponents, double? verticalSpacingBetweenGroup, TextStyle? inlineButtonTextStyle, TextStyle? buttonTextStyle, TextStyle? messageTextStyle, TextStyle? socialButtonTextStyle, BoxShadow? itemShadow, TextStyle? textFieldTextStyle, TextStyle? textFieldHintTextStyle, TextStyle? textFieldErrorTextStyle, ButtonStyle? inlineButtonStyle, Color? primary, Color? primaryDark, Color? primaryLight, Color? buttonOverlay, ButtonStyle? buttonStyle, ButtonStyle? socialButtonStyle, EdgeInsets? textFieldPadding}) → LoginTemplateStyle - Create a new instance using copy this instance
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultTemplate → LoginTemplateStyle
-
Create a default style.
final
Static Methods
-
only(
{EdgeInsets? screenPadding, double? verticalSpacingBetweenComponents, double? verticalSpacingBetweenSubComponents, double? verticalSpacingBetweenGroup, TextStyle? inlineButtonTextStyle, TextStyle? buttonTextStyle, TextStyle? messageTextStyle, TextStyle? socialButtonTextStyle, BoxShadow? itemShadow, TextStyle? textFieldTextStyle, TextStyle? textFieldHintTextStyle, TextStyle? textFieldErrorTextStyle, ButtonStyle? inlineButtonStyle, Color? primary, Color? primaryDark, Color? primaryLight, Color? buttonOverlay, ButtonStyle? buttonStyle, ButtonStyle? socialButtonStyle, EdgeInsets? textFieldPadding}) → LoginTemplateStyle - Create your own style that only change some child styles.