copyWith method
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,
);