-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1660 from ubuntu/refactor/migrate-away-from-old-p…
…roviders refactor: Migrate away snap model from old provider style
- Loading branch information
Showing
37 changed files
with
2,471 additions
and
1,712 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
flutter 3.19.3-stable | ||
flutter 3.19.6-stable |
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
11 changes: 11 additions & 0 deletions
11
packages/app_center/lib/src/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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:ubuntu_service/ubuntu_service.dart'; | ||
|
||
/// Used to listen to incoming errors to show them to the user. | ||
final errorStreamProvider = StreamProvider<Exception>( | ||
(ref) => getService<ErrorStreamController>().stream, | ||
); | ||
|
||
typedef ErrorStreamController = StreamController<Exception>; |
15 changes: 15 additions & 0 deletions
15
packages/app_center/lib/src/providers/file_system_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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:file/file.dart'; | ||
import 'package:file/local.dart'; | ||
import 'package:file/memory.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
|
||
/// Provides the correct file system to use for the environment. | ||
/// The file system is a [MemoryFileSystem] when running widget tests and a | ||
/// [LocalFileSystem] otherwise. | ||
final fileSystemProvider = Provider<FileSystem>( | ||
(_) => Platform.environment.containsKey('FLUTTER_TEST') | ||
? MemoryFileSystem() | ||
: const LocalFileSystem(), | ||
); |
Oops, something went wrong.