-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
NetworkRequestExecutor
; utilise Unit
; remove need for du…
…mmy providers targeting `dynamic` types (#503)
- Loading branch information
Showing
49 changed files
with
363 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
part of 'network_request_executor.dart'; | ||
|
||
extension ExecutorMapX<R> on _ExecutorResult<R> { | ||
/// If the result of the [Future] is a [Right], maps the value to a [C]. | ||
_ExecutorResult<C> map<C>(C Function(R) mapper) async { | ||
final result = await this; | ||
return result.map(mapper); | ||
} | ||
} | ||
|
||
extension ExecutorMapAllX<R> on _ExecutorResult<Iterable<R>> { | ||
/// If the result of the [Future] is a [Right], | ||
/// maps all values to a [List] of [C]. | ||
// TODO(marfavi): return Iterable instead of List? | ||
_ExecutorResult<List<C>> mapAll<C>(C Function(R) mapper) async { | ||
final result = await this; | ||
return result.map((items) => items.map(mapper).toList()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
lib/features/opening_hours/domain/repositories/opening_hours_repository.dart
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
lib/features/opening_hours/domain/usecases/check_open_status.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.