HWTextStyle class

A class representing text styling options for HWText.

Implemented types
Implementers

Constructors

HWTextStyle({double? fontSize, HWFontWeight? fontWeight, HWColor? color, bool? italic, bool? underline, bool? lineThrough, String? fontFamily, String? package, HWAndroidFont? androidFont, HWTextStyle? baseStyle})
const

Properties

androidFont → HWAndroidFont?
How Android renders this text, or null for HWAndroidFont.custom.
final
baseStyle → HWTextStyle?
final
color → HWColor?
final
effectiveColor → HWColor?
The color text in this style renders in, or null for the platform default.
no setter
effectiveFontSize → double?
The size text in this style renders at, the effective role's own size included, or null when nothing sets one.
no setter
effectiveFontSizeOrDefault → double
effectiveFontSize, or hwDefaultFontSize when nothing sets one.
no setter
fontFamily → String?
The font family text in this style renders with, as declared under flutter: fonts:, or null for the platform's own font.
final
fontSize → double?
final
fontVariant → HWFontVariant?
The font file text in this style renders with, or null when it renders in the platform's own font.
no setter
fontWeight → HWFontWeight?
final
hashCode → int
The hash code for this object.
no setterinherited
italic → bool?
final
kotlinImports → Set<String>
The imports the TextStyle(...) of toKotlin needs.
no setteroverride
lineThrough → bool?
final
package → String?
The package declaring fontFamily, or null when the app declares it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
swiftViewModifiers → Set<String>
The set of Swift view declarations/modifiers required by this element (e.g., @Environment(\\.colorScheme) var colorScheme).
no setteroverride
underline → bool?
final

Methods

kotlinRenderer({HWTextAlign? textAlign}) → HWKotlinTextRenderer
How Android renders text in this style, as HWAndroidFont resolves it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toKotlin(int indent, {required String dataExpr}) → String
The Glance TextStyle(...) for this style.
override
toString() → String
A string representation of this object.
inherited
toSwift(int indent, {required String dataExpr}) → String
Generates the SwiftUI code. indent is the number of indentation levels (4 spaces each). dataExpr is the Swift expression to access data fields (e.g. "entry.widgetData").
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited