draw method

void draw()

Implementation

void draw() {
  final delta = DateTime.now().difference(startDate);

  stdout.write([
    '\r',
    '${states[(delta.inMilliseconds ~/ animationSpeed.inMilliseconds) % states.length]} '
        .dim(),
    '$text ',
    '(${(delta.inMilliseconds / 1000).toStringAsFixed(1)} sec.) '.dim(),
  ].join());
}