-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Update tests to register mock services
- Loading branch information
Showing
20 changed files
with
1,083 additions
and
1,072 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
11 changes: 9 additions & 2 deletions
11
packages/app_center/lib/providers/error_stream_provider.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:riverpod_annotation/riverpod_annotation.dart'; | ||
import 'package:ubuntu_service/ubuntu_service.dart'; | ||
|
||
part 'error_stream_provider.g.dart'; | ||
|
||
/// Used to listen to incoming errors to show them to the user. | ||
final errorStreamProvider = StreamProvider<Exception>( | ||
(ref) => getService<ErrorStreamController>().stream, | ||
(ref) => ref.watch(errorStreamControllerProvider).stream, | ||
); | ||
|
||
@Riverpod(keepAlive: true) | ||
ErrorStreamController errorStreamController(ErrorStreamControllerRef ref) { | ||
return getService<ErrorStreamController>(); | ||
} | ||
|
||
typedef ErrorStreamController = StreamController<Exception>; |
26 changes: 26 additions & 0 deletions
26
packages/app_center/lib/providers/error_stream_provider.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.