copyWith method

DashboardTheme copyWith({
  1. Color? backgroundColor,
  2. Color? textColor,
  3. Color? warningColor,
  4. Color? errorColor,
  5. Color? chartLineColor,
  6. Color? chartFillColor,
})

Creates a copy of this theme with the given fields replaced

Implementation

DashboardTheme copyWith({
  Color? backgroundColor,
  Color? textColor,
  Color? warningColor,
  Color? errorColor,
  Color? chartLineColor,
  Color? chartFillColor,
}) {
  return DashboardTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textColor: textColor ?? this.textColor,
    warningColor: warningColor ?? this.warningColor,
    errorColor: errorColor ?? this.errorColor,
    chartLineColor: chartLineColor ?? this.chartLineColor,
    chartFillColor: chartFillColor ?? this.chartFillColor,
  );
}