FxTextStyle class
Visual configuration for FxText.
Pass to FxText.style to control typography, color, and link appearance. Use FxTextStyle.fromStyle to derive from an existing TextStyle.
FxText(
'Read our [Terms].',
style: FxTextStyle.fromStyle(theme.bodySmall).copyWith(
linkColor: Colors.blue,
),
)
Constructors
- FxTextStyle({Color? color, double? size, double? height, double textScale = 1.0, TextStyle? textStyle, int? maxLines, TextOverflow overflow = TextOverflow.clip, TextAlign? textAlign, FontWeight? fontWeight, Color? linkColor, FontWeight? linkFontWeight = FontWeight.w500})
-
const
- FxTextStyle.fromStyle(TextStyle style)
-
Derives an FxTextStyle from a Flutter TextStyle.
factory
Properties
- color → Color?
-
final
- fontWeight → FontWeight?
-
final
- getLinkTextStyle → TextStyle
-
TextStyle for tappable spans — applies linkColor and linkFontWeight.
no setter
- getTextStyle → TextStyle
-
Base TextStyle with color, size, height, and weight applied.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- linkColor → Color?
-
Color applied to tappable spans. Defaults to ColorScheme.primary.
final
- linkFontWeight → FontWeight?
-
Font weight applied to tappable spans. Defaults to FontWeight.w500.
final
- maxLines → int?
-
final
- overflow → TextOverflow
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double?
-
final
- textAlign → TextAlign?
-
final
- textScale → double
-
final
- textStyle → TextStyle?
-
final
Methods
-
copyWith(
{Color? color, double? size, double? height, double? textScale, TextStyle? textStyle, TextAlign? textAlign, int? maxLines, TextOverflow? overflow, FontWeight? fontWeight, Color? linkColor, FontWeight? linkFontWeight}) → FxTextStyle -
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