copyWith method

MTextStyle copyWith({
  1. double? size,
  2. MColor? color,
  3. double? opacity,
  4. bool? bold,
  5. MFontWeight? weight,
  6. bool? italic,
  7. MTextRole? role,
})

A copy with the given fields replaced.

Implementation

MTextStyle copyWith({
  double? size,
  MColor? color,
  double? opacity,
  bool? bold,
  MFontWeight? weight,
  bool? italic,
  MTextRole? role,
}) =>
    MTextStyle(
      size: size ?? this.size,
      color: color ?? this.color,
      opacity: opacity ?? this.opacity,
      bold: bold ?? this.bold,
      weight: weight ?? this.weight,
      italic: italic ?? this.italic,
      role: role ?? this.role,
      baseStyle: baseStyle,
    );