copyWith method
TextStyle
copyWith({
- num? fontSize,
- FontWeight? fontWeight,
- String? fontStyle,
- Color? color,
- num? letterSpacing,
- num? height,
- String? fontFamily,
- TextDecoration? decoration,
Returns a copy with selected values replaced.
Implementation
TextStyle copyWith(
{num? fontSize,
FontWeight? fontWeight,
String? fontStyle,
Color? color,
num? letterSpacing,
num? height,
String? fontFamily,
TextDecoration? decoration}) =>
TextStyle(
fontSize: fontSize ?? this.fontSize,
fontWeight: fontWeight ?? this.fontWeight,
fontStyle: fontStyle ?? this.fontStyle,
color: color ?? this.color,
letterSpacing: letterSpacing ?? this.letterSpacing,
height: height ?? this.height,
fontFamily: fontFamily ?? this.fontFamily,
decoration: decoration ?? this.decoration);