StopwatchModel constructor

StopwatchModel({
  1. Duration interval = const Duration(milliseconds: 100),
})

Creates a new stopwatch model.

interval is how often the stopwatch ticks (defaults to 100 milliseconds).

Implementation

StopwatchModel({this.interval = const Duration(milliseconds: 100)})
  : _elapsed = Duration.zero,
    _running = false,
    _id = _nextStopwatchId(),
    _tag = 0;