copyWith method

  1. @override
DiagramTheme copyWith({
  1. Color? canvasBg,
  2. Color? panelBg,
  3. Color? gridLine,
  4. Color? nodeBg,
  5. Color? nodeBorder,
  6. Color? textColor,
  7. Color? accentColor,
  8. bool? isDark,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
DiagramTheme copyWith({
  Color? canvasBg,
  Color? panelBg,
  Color? gridLine,
  Color? nodeBg,
  Color? nodeBorder,
  Color? textColor,
  Color? accentColor,
  bool? isDark,
}) {
  return DiagramTheme(
    canvasBg: canvasBg ?? this.canvasBg,
    panelBg: panelBg ?? this.panelBg,
    gridLine: gridLine ?? this.gridLine,
    nodeBg: nodeBg ?? this.nodeBg,
    nodeBorder: nodeBorder ?? this.nodeBorder,
    textColor: textColor ?? this.textColor,
    accentColor: accentColor ?? this.accentColor,
    isDark: isDark ?? this.isDark,
  );
}