PasswordTextFieldTheme class
A theme class that defines the visual styling for PasswordTextField.
This class encapsulates all style-related properties, allowing for easy reuse and consistent styling across multiple password fields.
Example usage:
const myTheme = PasswordTextFieldTheme(
width: 300,
height: 56,
borderRadius: 12,
focusBorderColor: Colors.blue,
backgroundColor: Colors.grey,
);
PasswordTextField(
theme: myTheme,
labelText: 'Password',
)
Constructors
- PasswordTextFieldTheme({double? width, double? height, double? borderWidth, double? borderRadius, EdgeInsetsGeometry? contentPadding, Color? backgroundColor, Color? borderColor, Color? focusBorderColor, Color? errorBorderColor, TextStyle? textStyle, TextStyle? labelStyle, TextStyle? hintStyle, TextStyle? floatingLabelStyle, TextStyle? capsLockWarningStyle, Color? visibilityIconColor, double? visibilityIconSize})
-
const
Properties
- backgroundColor → Color?
-
The background fill color of the text field.
final
- borderColor → Color?
-
The border color when the text field is not focused.
final
- borderRadius → double?
-
The border radius of the text field corners.
final
- borderWidth → double?
-
The width of the border around the text field.
final
- capsLockWarningStyle → TextStyle?
-
The text style for the Caps Lock warning message.
final
- contentPadding → EdgeInsetsGeometry?
-
The padding inside the text field around the input area.
final
- errorBorderColor → Color?
-
The border color when Caps Lock is enabled (error state).
final
- floatingLabelStyle → TextStyle?
-
The text style for the floating label when focused.
final
- focusBorderColor → Color?
-
The border color when the text field is focused.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The height of the text field.
final
- hintStyle → TextStyle?
-
The text style for the hint text.
final
- labelStyle → TextStyle?
-
The text style for the label text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textStyle → TextStyle?
-
The text style for the input text.
final
- visibilityIconColor → Color?
-
The color of the visibility toggle icon.
final
- visibilityIconSize → double?
-
The size of the visibility toggle icon.
final
- width → double?
-
The width of the text field.
final
Methods
-
copyWith(
{double? width, double? height, double? borderWidth, double? borderRadius, EdgeInsetsGeometry? contentPadding, Color? backgroundColor, Color? borderColor, Color? focusBorderColor, Color? errorBorderColor, TextStyle? textStyle, TextStyle? labelStyle, TextStyle? hintStyle, TextStyle? floatingLabelStyle, TextStyle? capsLockWarningStyle, Color? visibilityIconColor, double? visibilityIconSize}) → PasswordTextFieldTheme - Creates a copy of this theme with the given properties overridden.
-
merge(
PasswordTextFieldTheme? other) → PasswordTextFieldTheme - Merges this theme with another theme, with this theme's values taking priority.
-
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
Constants
- defaults → const PasswordTextFieldTheme
- The default theme values used when properties are not specified.