Skip to content

Commit

Permalink
feat: Add additional future option method
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmah309 committed Dec 3, 2023
1 parent 993e925 commit 3fd83c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/option/future_option_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ extension FutureToOption2<T extends Object> on Future<T> {
}
}

extension FutureToOption3<T extends Object> on Option<T> {
/// Converts a Option<T> to Future<Option<T>>.
Future<Option<T>> toFutureOption() async {
return this;
}
}

extension FutureOptionOptionExtension<T extends Object>
on FutureOption<Option<T>> {
/// Converts from FutureOption<Option<T>> to FutureOption<T>.
Expand Down

0 comments on commit 3fd83c6

Please sign in to comment.