delay method

Future<void> delay(
  1. 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);


Future<void> delay(num time) async {
  final nextTime = elapsedTime + time;
  await for (var elapsedTime in onElapsedTimeChange) {
    if (elapsedTime >= nextTime) break;