Returns a Future
that resolves before the next animation frame with the given runtime
Source
Future<num> nextFrame() async { final completer = new Completer<num>(); window.requestAnimationFrame( (time) => completer.complete(time) ); return completer.future; }