start method
Starts the activity indicator.
The interval
is the interval of the activity indicator.
Implementation
void start([Duration interval = const Duration(milliseconds: 100)]) {
if (_timer != null) {
throw StateError('The activity indicator is already started.');
}
activity.render(_console, ActivityIndicatorState.ready);
_timer = Timer.periodic(interval, (timer) {
if (timer.tick > 0) {
_console.unephemeral();
}
_console.ephemeral();
activity.render(_console, ActivityIndicatorState.active(timer.tick));
});
}