copyWith method

Style copyWith(
  1. {Color? foreground,
  2. Color? background}
)

Returns a copy of this style with the given properties.

If no arguments are provided, the current style is returned.

Implementation

Style copyWith({
  Color? foreground,
  Color? background,
}) {
  return Style(
    foreground: foreground ?? this.foreground,
    background: background ?? this.background,
  );
}