TextStyleConfig class

文本样式配置

Constructors

TextStyleConfig({required double fontSize, FontWeight fontWeight = FontWeight.w400, Color? color, FontStyle? fontStyle, double? letterSpacing, double? height})
const

Properties

color → Color?
字体颜色(可选,如果为null则使用主题颜色)
final
fontSize → double
字体大小
final
fontStyle → FontStyle?
字体样式(斜体等)
final
fontWeight → FontWeight
字体粗细
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
行高倍数
final
letterSpacing → double?
字间距
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({double? fontSize, FontWeight? fontWeight, Color? color, FontStyle? fontStyle, double? letterSpacing, double? height}) → TextStyleConfig
复制并修改
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toTextStyle({Color? defaultColor, Color? colorResolver(BuildContext)?}) → TextStyle
转换为 TextStyle

Operators

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