copyWith method

AnsiStyle copyWith({
  1. Color? foreground,
  2. Color? background,
  3. bool? bold,
  4. bool? italic,
  5. bool? underline,
  6. bool? strikethrough,
  7. bool? dim,
  8. bool? inverse,
})

Implementation

AnsiStyle copyWith({
  Color? foreground,
  Color? background,
  bool? bold,
  bool? italic,
  bool? underline,
  bool? strikethrough,
  bool? dim,
  bool? inverse,
}) {
  return AnsiStyle(
    foreground: foreground ?? this.foreground,
    background: background ?? this.background,
    bold: bold ?? this.bold,
    italic: italic ?? this.italic,
    underline: underline ?? this.underline,
    strikethrough: strikethrough ?? this.strikethrough,
    dim: dim ?? this.dim,
    inverse: inverse ?? this.inverse,
  );
}