copyWith method

ChartsConfig copyWith({
  1. ChartTheme? theme,
  2. bool? useGlassmorphism,
  3. bool? useNeumorphism,
  4. Widget? emptyWidget,
  5. String? emptyMessage,
  6. Widget? errorWidget,
  7. String? errorMessage,
  8. List<BoxShadow>? boxShadow,
  9. Duration? animationDuration,
})

Creates a copy of this config with the given fields replaced.

Implementation

ChartsConfig copyWith({
  ChartTheme? theme,
  bool? useGlassmorphism,
  bool? useNeumorphism,
  Widget? emptyWidget,
  String? emptyMessage,
  Widget? errorWidget,
  String? errorMessage,
  List<BoxShadow>? boxShadow,
  Duration? animationDuration,
}) {
  return ChartsConfig(
    useGlassmorphism: useGlassmorphism ?? this.useGlassmorphism,
    useNeumorphism: useNeumorphism ?? this.useNeumorphism,
    emptyWidget: emptyWidget ?? this.emptyWidget,
    emptyMessage: emptyMessage ?? this.emptyMessage,
    errorWidget: errorWidget ?? this.errorWidget,
    errorMessage: errorMessage ?? this.errorMessage,
    boxShadow: boxShadow ?? this.boxShadow,
    theme: theme ?? this.theme,
    animationDuration: animationDuration ?? this.animationDuration,
  );
}