toTaskOption method

  1. @override
TaskOption<T> toTaskOption()
override

Convert this Option to a TaskOption.

Used to convert a sync context (Option) to an async context (TaskOption). You should convert Option to TaskOption every time you need to call an async (Future) function based on the value in Option.

Implementation

@override
TaskOption<T> toTaskOption() => TaskOption.of(_value);