copyWith method

CustomThemeData copyWith({
  1. Color? primaryColor,
  2. Color? accentColor,
  3. Color? backgroundColor,
  4. Color? textColor,
  5. Brightness? brightness,
  6. Color? surfaceColor,
  7. Color? errorColor,
  8. String? fontFamily,
})

Implementation

CustomThemeData copyWith({
  Color? primaryColor,
  Color? accentColor,
  Color? backgroundColor,
  Color? textColor,
  Brightness? brightness,
  Color? surfaceColor,
  Color? errorColor,
  String? fontFamily,
}) {
  return CustomThemeData(
    primaryColor: primaryColor ?? this.primaryColor,
    accentColor: accentColor ?? this.accentColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textColor: textColor ?? this.textColor,
    brightness: brightness ?? this.brightness,
    surfaceColor: surfaceColor ?? this.surfaceColor,
    errorColor: errorColor ?? this.errorColor,
    fontFamily: fontFamily ?? this.fontFamily,
  );
}