flatMap<B> method
Used to chain multiple functions that return a Task.
You can extract the value inside the Task without actually running it.
Implementation
@override
Task<B> flatMap<B>(covariant Task<B> Function(A a) f) =>
Task(() => run().then((v) => f(v).run()));