Skip to content

Commit

Permalink
fix: example tests to use Set for overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyus committed Apr 2, 2024
1 parent 18041b3 commit 623e433
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/counter/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Controller {
final countControllerRef = Ref.scoped((ctx) => Controller());

void main() {
runApp(LiteRefScope(child: const MyApp()));
runApp(const LiteRefScope(child: MyApp()));
}

class MyApp extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions examples/counter/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ extension PumpApp on WidgetTester {
Future<void> pumpApp(MockCounterController controller) {
return pumpWidget(
LiteRefScope(
overrides: [
overrides: {
countControllerRef.overrideWith((_) => controller),
],
},
child: const MyApp(),
),
);
Expand Down
2 changes: 1 addition & 1 deletion examples/flutter_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flutter_example/settings/view.dart';
import 'package:lite_ref/lite_ref.dart';

void main(List<String> args) {
runApp(LiteRefScope(child: const MyApp()));
runApp(const LiteRefScope(child: MyApp()));
}

class MyApp extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions examples/flutter_example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ void main() {
// Build our app and trigger a frame.
await tester.pumpWidget(
LiteRefScope(
overrides: [
overrides: {
settingsServiceRef.overrideWith((_) => mockSettingsService),
settingsControllerRef.overrideWith((_) => mockSettingsController),
],
},
child: const MyApp(),
),
);
Expand Down

0 comments on commit 623e433

Please sign in to comment.