copyWith method

  1. @override
DayNightSwitcherIcon copyWith({
  1. bool? isDarkModeEnabled,
  2. SwitcherStateChangedCallback? onStateChanged,
  3. VoidCallback? onLongPress,
  4. Color? dayBackgroundColor,
  5. Color? nightBackgroundColor,
  6. Color? sunColor,
  7. Color? moonColor,
  8. Color? starsColor,
  9. Color? cloudsColor,
  10. Color? cratersColor,
})

Allows to have a copy of this instance with the given parameters.

Implementation

@override
DayNightSwitcherIcon copyWith({
  bool? isDarkModeEnabled,
  SwitcherStateChangedCallback? onStateChanged,
  VoidCallback? onLongPress,
  Color? dayBackgroundColor,
  Color? nightBackgroundColor,
  Color? sunColor,
  Color? moonColor,
  Color? starsColor,
  Color? cloudsColor,
  Color? cratersColor,
}) =>
    DayNightSwitcherIcon(
      isDarkModeEnabled: isDarkModeEnabled ?? this.isDarkModeEnabled,
      onStateChanged: onStateChanged ?? this.onStateChanged,
      onLongPress: onLongPress ?? this.onLongPress,
      dayBackgroundColor: dayBackgroundColor ?? this.dayBackgroundColor,
      nightBackgroundColor: nightBackgroundColor ?? this.nightBackgroundColor,
      sunColor: sunColor ?? this.sunColor,
      moonColor: moonColor ?? this.moonColor,
      starsColor: starsColor ?? this.starsColor,
      cloudsColor: cloudsColor ?? this.cloudsColor,
      cratersColor: cratersColor ?? this.cratersColor,
    );