copyWith method
Creates a copy of this model with the given fields replaced.
Implementation
StopwatchModel copyWith({
Duration? elapsed,
Duration? interval,
bool? running,
int? id,
int? tag,
}) {
return StopwatchModel._(
elapsed: elapsed ?? _elapsed,
interval: interval ?? this.interval,
running: running ?? _running,
id: id ?? _id,
tag: tag ?? _tag,
);
}