copyWith method

  1. @override
BodyMedium copyWith({
  1. String? text,
  2. Color? color,
  3. TextAlign? textAlign,
  4. bool? softWrap,
  5. int? maxLines,
  6. TextOverflow? overflow,
  7. double? fontSize,
  8. TextDecoration? decoration,
  9. FontWeight? fontWeight,
})

Implementation

@override
BodyMedium copyWith({
  String? text,
  Color? color,
  TextAlign? textAlign,
  bool? softWrap,
  int? maxLines,
  TextOverflow? overflow,
  double? fontSize,
  TextDecoration? decoration,
  FontWeight? fontWeight,
}) {
  return BodyMedium._(
    text ?? data!,
    key: key,
    textStyle: textStyle,
    textAlign: textAlign ?? this.textAlign,
    softWrap: softWrap ?? this.softWrap,
    maxLines: maxLines ?? this.maxLines,
    overflow: overflow ?? this.overflow,
    color: color ?? _color,
    decoration: decoration ?? _decoration,
    fontWeight: fontWeight ?? _fontWeight,
    fontSize: fontSize ?? _fontSize,
  );
}