TextStyles class
Defines text styles for widgets in the SDK
Widgets using this class will use default values from the app's theme, as defined in TextStyles.merge
Constructors
- TextStyles({required Color? textColor, required Color? errorTextColor, required Color? cursorColor, required Color? hintTextColor, required double? textSize, String? fontAsset, String? iOSFontName})
-
Define custom text styles by providing values for each property
const
- TextStyles.merge({TextStyles? otherStyles, required ThemeData? theme})
-
Define custom text styles by merging
otherStyles
and values fromtheme
factory - TextStyles.only({Color? textColor, Color? errorTextColor, Color? cursorColor, Color? hintTextColor, double? textSize, String? fontAsset, String? iOSFontName})
-
Define custom text styles by providing values for only the properties you want to customize
const
Properties
- cursorColor → Color?
-
Color of the cursor
final
- errorTextColor → Color?
-
The color of user-entered text when it is in an error state
final
- fontAsset → String?
-
The path to a font asset defined in pubspec.yaml. If not specified, default platform-specific system fonts
will be used.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintTextColor → Color?
-
Color of the placeholder for each input field
final
- iOSFontName → String?
-
The name used by iOS to identify the font associated with fontAsset.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textColor → Color?
-
The color for user-entered text on an input field
final
- textSize → double?
-
Size of the text within the card input widget
final
Methods
-
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 Methods
-
getThemeAwareDefaultErrorTextColor(
ThemeData? theme) → Color
Constants
- defaultCursorColor → const MaterialColor
- Default cursor color
- defaultDarkThemeErrorTextColor → const Color
- Default error color for a dark theme
- defaultDarkThemeTextColor → const Color
- Default text color for a dark theme
- defaultFontSize → const double
- Default font size
- defaultHintTextColor → const Color
- Default hint text color
- defaultLightThemeErrorTextColor → const Color
- Default error color for a light theme
- defaultLightThemeTextColor → const Color
- Default text color for a light theme