copyWith method
CountdownConfig
copyWith({
- Duration? duration,
- Duration? interval,
- bool? autoStart,
- bool? showControls,
- bool? showReset,
- bool? showMilliseconds,
- Duration? animationDuration,
- bool? enableHapticFeedback,
- String customFormatter()?,
- VoidCallback? onFinish,
- VoidCallback? onPause,
- VoidCallback? onResume,
- VoidCallback? onReset,
- void onTick(
- Duration remaining
Creates a copy of this config with the given fields replaced
Implementation
CountdownConfig copyWith({
Duration? duration,
Duration? interval,
bool? autoStart,
bool? showControls,
bool? showReset,
bool? showMilliseconds,
Duration? animationDuration,
bool? enableHapticFeedback,
String Function(Duration)? customFormatter,
VoidCallback? onFinish,
VoidCallback? onPause,
VoidCallback? onResume,
VoidCallback? onReset,
void Function(Duration remaining)? onTick,
}) {
return CountdownConfig(
duration: duration ?? this.duration,
interval: interval ?? this.interval,
autoStart: autoStart ?? this.autoStart,
showControls: showControls ?? this.showControls,
showReset: showReset ?? this.showReset,
showMilliseconds: showMilliseconds ?? this.showMilliseconds,
animationDuration: animationDuration ?? this.animationDuration,
enableHapticFeedback: enableHapticFeedback ?? this.enableHapticFeedback,
customFormatter: customFormatter ?? this.customFormatter,
onFinish: onFinish ?? this.onFinish,
onPause: onPause ?? this.onPause,
onResume: onResume ?? this.onResume,
onReset: onReset ?? this.onReset,
onTick: onTick ?? this.onTick,
);
}