copyWith method

TimerModel copyWith({
  1. Duration? timeout,
  2. Duration? interval,
  3. bool? running,
  4. int? id,
  5. int? tag,
})

Creates a copy of this model with the given fields replaced.

Implementation

TimerModel copyWith({
  Duration? timeout,
  Duration? interval,
  bool? running,
  int? id,
  int? tag,
}) {
  return TimerModel._(
    timeout: timeout ?? this.timeout,
    interval: interval ?? this.interval,
    running: running ?? _running,
    id: id ?? _id,
    tag: tag ?? _tag,
  );
}