copyWith method

GhosttyTerminalStyle copyWith({
  1. bool? bold,
  2. bool? faint,
  3. bool? italic,
  4. GhosttySgrUnderline? underline,
  5. bool clearUnderline = false,
  6. GhosttyTerminalColor? underlineColor,
  7. bool clearUnderlineColor = false,
  8. bool? overline,
  9. bool? blink,
  10. bool? inverse,
  11. bool? invisible,
  12. bool? strikethrough,
  13. GhosttyTerminalColor? foreground,
  14. bool clearForeground = false,
  15. GhosttyTerminalColor? background,
  16. bool clearBackground = false,
  17. String? hyperlink,
  18. bool clearHyperlink = false,
})

Implementation

GhosttyTerminalStyle copyWith({
  bool? bold,
  bool? faint,
  bool? italic,
  GhosttySgrUnderline? underline,
  bool clearUnderline = false,
  GhosttyTerminalColor? underlineColor,
  bool clearUnderlineColor = false,
  bool? overline,
  bool? blink,
  bool? inverse,
  bool? invisible,
  bool? strikethrough,
  GhosttyTerminalColor? foreground,
  bool clearForeground = false,
  GhosttyTerminalColor? background,
  bool clearBackground = false,
  String? hyperlink,
  bool clearHyperlink = false,
}) {
  return GhosttyTerminalStyle(
    bold: bold ?? this.bold,
    faint: faint ?? this.faint,
    italic: italic ?? this.italic,
    underline: clearUnderline ? null : (underline ?? this.underline),
    underlineColor: clearUnderlineColor
        ? null
        : (underlineColor ?? this.underlineColor),
    overline: overline ?? this.overline,
    blink: blink ?? this.blink,
    inverse: inverse ?? this.inverse,
    invisible: invisible ?? this.invisible,
    strikethrough: strikethrough ?? this.strikethrough,
    foreground: clearForeground ? null : (foreground ?? this.foreground),
    background: clearBackground ? null : (background ?? this.background),
    hyperlink: clearHyperlink ? null : (hyperlink ?? this.hyperlink),
  );
}