flatMap<C> method
Used to chain multiple functions that return a TaskOption.
You can extract the value of every Some in the chain without handling all possible missing cases. If running any of the tasks in the chain returns None, the result is None.
Implementation
@override
TaskOption<C> flatMap<C>(covariant TaskOption<C> Function(R r) f) =>
TaskOption(() => run().then(
(option) async => option.match(
Option.none,
(r) => f(r).run(),
),
));