copyWith method

  1. @override
DsAppPalette copyWith({
  1. Color? backgroundPrimary,
  2. Color? backgroundSecondary,
  3. LinearGradient? backgroundGradient,
  4. Color? glassSurface,
  5. Color? glassHighSurface,
  6. Color? glassBorder,
  7. Color? buttonSurface,
  8. Color? buttonSurfacePressed,
  9. Color? textPrimary,
  10. Color? textSecondary,
  11. Color? textDisabled,
  12. Color? accentBlue,
  13. Color? accentPurple,
  14. Color? lockedSurface,
  15. Color? keyboardBarBackground,
  16. Color? terminalBackground,
  17. Color? terminalText,
})
override

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

Implementation

@override
DsAppPalette copyWith({
  Color? backgroundPrimary,
  Color? backgroundSecondary,
  LinearGradient? backgroundGradient,
  Color? glassSurface,
  Color? glassHighSurface,
  Color? glassBorder,
  Color? buttonSurface,
  Color? buttonSurfacePressed,
  Color? textPrimary,
  Color? textSecondary,
  Color? textDisabled,
  Color? accentBlue,
  Color? accentPurple,
  Color? lockedSurface,
  Color? keyboardBarBackground,
  Color? terminalBackground,
  Color? terminalText,
}) {
  return DsAppPalette(
    backgroundPrimary: backgroundPrimary ?? this.backgroundPrimary,
    backgroundSecondary: backgroundSecondary ?? this.backgroundSecondary,
    backgroundGradient: backgroundGradient ?? this.backgroundGradient,
    glassSurface: glassSurface ?? this.glassSurface,
    glassHighSurface: glassHighSurface ?? this.glassHighSurface,
    glassBorder: glassBorder ?? this.glassBorder,
    buttonSurface: buttonSurface ?? this.buttonSurface,
    buttonSurfacePressed: buttonSurfacePressed ?? this.buttonSurfacePressed,
    textPrimary: textPrimary ?? this.textPrimary,
    textSecondary: textSecondary ?? this.textSecondary,
    textDisabled: textDisabled ?? this.textDisabled,
    accentBlue: accentBlue ?? this.accentBlue,
    accentPurple: accentPurple ?? this.accentPurple,
    lockedSurface: lockedSurface ?? this.lockedSurface,
    keyboardBarBackground:
        keyboardBarBackground ?? this.keyboardBarBackground,
    terminalBackground: terminalBackground ?? this.terminalBackground,
    terminalText: terminalText ?? this.terminalText,
  );
}