async keywords were introduced in Dart 1.9.4 in order to simplify asynchronous operations. Consider the following call to a method that returns
This is fine for the post part, but what if things get more complicated and
handlerFunction returns a future too?
Things are starting to get complicated already—debugging is not straightforward. Ideally, we would want to deal with one part of the chain at a time and hold up the execution of statements until a desired operation is complete. This is what
var f1 = await obj.aMethod(); var result = await f1.aMethod();
Functions and methods to be ...