copyWith method

TextStyle copyWith({
  1. double? fontSize,
  2. Color? color,
  3. FontStyle? fontStyle,
  4. FontWeight? fontWeight,
  5. double? letterSpacing,
})

Implementation

TextStyle copyWith({
  double? fontSize,
  Color? color,
  flutter.FontStyle? fontStyle,
  flutter.FontWeight? fontWeight,
  double? letterSpacing,
}) {
  return TextStyle(
    type: type,
    color: color ?? this.color,
    fontSize: fontSize ?? this.fontSize,
    fontStyle: fontStyle ?? this.fontStyle,
    fontWeight: fontWeight ?? this.fontWeight,
    letterSpacing: letterSpacing ?? this.letterSpacing,
  );
}