LoginTheme class
A customizable theme class for the login UI.
Use this class to override the default styling for the FlutterLogin widget, including colors, typography, input decoration, button appearance, and more.
Pass an instance of LoginTheme to the theme
parameter of FlutterLogin.
Example:
FlutterLogin(
theme: LoginTheme(
primaryColor: Colors.deepPurple,
accentColor: Colors.orange,
titleStyle: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
)
- Mixed-in types
Constructors
- LoginTheme.new({Color? pageColorLight, Color? pageColorDark, Color? primaryColor, Color? accentColor, Color? errorColor, CardTheme cardTheme = const CardTheme(), InputDecorationTheme inputTheme = const InputDecorationTheme(filled: true), LoginButtonTheme buttonTheme = const LoginButtonTheme(), TextStyle? titleStyle, TextStyle? bodyStyle, TextStyle? textFieldStyle, TextStyle? buttonStyle, double beforeHeroFontSize = 48.0, double afterHeroFontSize = 15.0, Color? switchAuthTextColor, EdgeInsets? authButtonPadding, EdgeInsets? providerButtonPadding, double? logoWidth, bool primaryColorAsInputLabel = false, double? headerMargin, double? cardInitialHeight, double? cardTopPosition})
- Creates a LoginTheme instance to customize the look and feel of the authentication UI.
Properties
- accentColor → Color?
-
The secondary color, used for title text color, loading icon, etc. Should
be contrast with the primaryColor
final
- afterHeroFontSize → double
-
Defines the font size of the title in the screen after the login screen
(after the hero transition)
final
- authButtonPadding → EdgeInsets?
-
Provide custom padding for the switch signUp / login button
final
- beforeHeroFontSize → double
-
Defines the font size of the title in the login screen (before the hero
transition)
final
- bodyStyle → TextStyle?
-
Text style for small text like the recover password description
final
-
Text style for button text
final
-
A theme for customizing the shape, elevation, and color of the submit
button
final
- cardInitialHeight → double?
-
The initial height of the login card
final
- cardTheme → CardTheme
-
The colors and styles used to render auth Card
final
- cardTopPosition → double?
-
The top position of the login card
final
- errorColor → Color?
-
The color to use for TextField input validation errors
final
-
Color of the footer background
final
-
Provide custom bottom padding for the footer.
final
-
Text style for footer text
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- headerMargin → double?
-
The distance between the header and the login screen
final
- inputTheme → InputDecorationTheme
-
Defines the appearance of all TextFields
final
- logoWidth → double?
-
Set the width of the logo. Defaults to 0.75 times the card size.
Value can be between 0 and 1 (or higher) where 1 is the full width
of the login card.
final
- pageColorDark → Color?
-
The background color of the login page for dark gradient; if provided,
overrides the computed primaryColorDark for page background
final
- pageColorLight → Color?
-
The background color of the login page for light gradient; if provided,
overrides the primaryColor for page background
final
- primaryColor → Color?
-
The background color of major parts of the widget like the login screen
and buttons
final
- primaryColorAsInputLabel → bool
-
Set to true if you want to use the primary color for input labels.
final
- providerButtonPadding → EdgeInsets?
-
Provide custom padding for the provider buttons
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- switchAuthTextColor → Color?
-
Color of the switch authentication button
final
- textFieldStyle → TextStyle?
-
Text style for TextField input text
final
- titleStyle → TextStyle?
-
Text style for the big title
final
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited