diff --git a/examples/counter/lib/main.dart b/examples/counter/lib/main.dart index 3728200..31fea77 100644 --- a/examples/counter/lib/main.dart +++ b/examples/counter/lib/main.dart @@ -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 { diff --git a/examples/counter/test/widget_test.dart b/examples/counter/test/widget_test.dart index 9139dfa..cbed939 100644 --- a/examples/counter/test/widget_test.dart +++ b/examples/counter/test/widget_test.dart @@ -12,9 +12,9 @@ extension PumpApp on WidgetTester { Future pumpApp(MockCounterController controller) { return pumpWidget( LiteRefScope( - overrides: [ + overrides: { countControllerRef.overrideWith((_) => controller), - ], + }, child: const MyApp(), ), ); diff --git a/examples/flutter_example/lib/main.dart b/examples/flutter_example/lib/main.dart index b5ae86d..91052f1 100644 --- a/examples/flutter_example/lib/main.dart +++ b/examples/flutter_example/lib/main.dart @@ -4,7 +4,7 @@ import 'package:flutter_example/settings/view.dart'; import 'package:lite_ref/lite_ref.dart'; void main(List args) { - runApp(LiteRefScope(child: const MyApp())); + runApp(const LiteRefScope(child: MyApp())); } class MyApp extends StatelessWidget { diff --git a/examples/flutter_example/test/widget_test.dart b/examples/flutter_example/test/widget_test.dart index 95cb6c4..ce40285 100644 --- a/examples/flutter_example/test/widget_test.dart +++ b/examples/flutter_example/test/widget_test.dart @@ -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(), ), );