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.new({required Color? textColor, required Color? errorTextColor, required Color? cursorColor, required Color? hintTextColor, required double? textSize, required double? errorTextSize, String? fontAsset, String? iOSFontName, String? errorFontAsset})
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 from theme
factory
TextStyles.only({Color? textColor, Color? errorTextColor, Color? cursorColor, Color? hintTextColor, double? textSize, double? errorTextSize, String? fontAsset, String? iOSFontName, String? errorFontAsset})
Define custom text styles by providing values for only the properties you want to customize
const

Properties

cursorColor Color?
Color of the cursor
final
errorFontAsset String?
Font asset for the error message text below the input widget (Android CardDetailsFormTextField only)
final
errorTextColor Color?
The color of user-entered text when it is in an error state
final
errorTextSize double?
Size of the error message text below input widget
final
fontAsset String?
Font asset for the text within the input widget
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

Constants

darkFormDefaults → const TextStyles
Convenience property for getting a TextStyles instance with dark theme defaults for the CardDetailsFormTextField widget
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
defaultErrorFontSize → const double
Default font size of the error message below the input widget (Android CardDetailsFormTextField only)
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
lightFormDefaults → const TextStyles
Convenience property for getting a TextStyles instance with light theme defaults for the CardDetailsFormTextField widget