From 4cfaeb79e1af08ccbb1faebc9ac9b16bf48f56d7 Mon Sep 17 00:00:00 2001 From: Honza Bittner Date: Fri, 16 Feb 2024 12:14:44 +0100 Subject: [PATCH 1/2] Update analysis to 8 --- packages/netglade_analysis/README.md | 2 +- packages/netglade_flutter_utils/example/pubspec.yaml | 2 +- packages/netglade_flutter_utils/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/netglade_analysis/README.md b/packages/netglade_analysis/README.md index c5ce55b..159241a 100644 --- a/packages/netglade_analysis/README.md +++ b/packages/netglade_analysis/README.md @@ -23,7 +23,7 @@ To use the lints, add as a dev dependency in your `pubspec.yaml`: ```yaml dev_dependencies: - netglade_analysis: ^7.0.0 + netglade_analysis: ^8.0.0 ``` Then, add an include in `analysis_options.yaml`: diff --git a/packages/netglade_flutter_utils/example/pubspec.yaml b/packages/netglade_flutter_utils/example/pubspec.yaml index 227d307..409ca0b 100644 --- a/packages/netglade_flutter_utils/example/pubspec.yaml +++ b/packages/netglade_flutter_utils/example/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - netglade_analysis: ^7.0.0 + netglade_analysis: ^8.0.0 netglade_flutter_utils: path: .. diff --git a/packages/netglade_flutter_utils/pubspec.yaml b/packages/netglade_flutter_utils/pubspec.yaml index 13d1eca..b826a09 100644 --- a/packages/netglade_flutter_utils/pubspec.yaml +++ b/packages/netglade_flutter_utils/pubspec.yaml @@ -19,7 +19,7 @@ dev_dependencies: flutter_test: sdk: flutter mocktail: ^1.0.0 - netglade_analysis: ^7.0.0 + netglade_analysis: ^8.0.0 test: ^1.24.6 flutter: From 6abe901a8403b0f17c848910b89f85b4a76c4194 Mon Sep 17 00:00:00 2001 From: Honza Bittner Date: Fri, 16 Feb 2024 12:22:03 +0100 Subject: [PATCH 2/2] Fix lint --- .../test/src/hooks/route_aware_test.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/netglade_flutter_utils/test/src/hooks/route_aware_test.dart b/packages/netglade_flutter_utils/test/src/hooks/route_aware_test.dart index f1fb12e..9de9d0e 100644 --- a/packages/netglade_flutter_utils/test/src/hooks/route_aware_test.dart +++ b/packages/netglade_flutter_utils/test/src/hooks/route_aware_test.dart @@ -32,15 +32,6 @@ class _UnderTestWidget extends HookWidget { required this.onAction, }); - void _handlePopBtnPressed(BuildContext context) { - Navigator.of(context).pop(); - } - - void _handlePushNextBtnPressed(BuildContext context) { - // ignore: avoid-undisposed-instances, ok for test - unawaited(Navigator.of(context).push(MaterialPageRoute(builder: (_) => const _MockPage()))); - } - @override Widget build(BuildContext context) { final state = useState('??'); @@ -80,6 +71,15 @@ class _UnderTestWidget extends HookWidget { ], ); } + + void _handlePopBtnPressed(BuildContext context) { + Navigator.of(context).pop(); + } + + void _handlePushNextBtnPressed(BuildContext context) { + // ignore: avoid-undisposed-instances, ok for test + unawaited(Navigator.of(context).push(MaterialPageRoute(builder: (_) => const _MockPage()))); + } } void main() {