copyWith method
Creates a copy of this state with optional field updates.
Implementation
DebouncerState copyWith({
bool? isRunning,
bool? isDisposed,
int? executionCount,
DateTime? lastExecutionTime,
Duration? remainingTime,
Duration? remainingMaxWait,
bool? isPaused,
}) {
return DebouncerState(
isRunning: isRunning ?? this.isRunning,
isDisposed: isDisposed ?? this.isDisposed,
executionCount: executionCount ?? this.executionCount,
lastExecutionTime: lastExecutionTime ?? this.lastExecutionTime,
remainingTime: remainingTime ?? this.remainingTime,
remainingMaxWait: remainingMaxWait ?? this.remainingMaxWait,
isPaused: isPaused ?? this.isPaused,
);
}