Future delay(num time)

Returns a Future which completes after time seconds.

This method is based on the onElapsedTimeChange stream and is therefore executed before all other animatables.

await juggler.delay(1.0);

Source

Future delay(num time) async {
  var nextTime = this.elapsedTime + time;
  await for (var elapsedTime in this.onElapsedTimeChange) {
    if (elapsedTime >= nextTime) break;
  }
}