From bc0ae1011e08df545ee9b27bd0688ac613e8b260 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:19:36 +0000 Subject: [PATCH 1/2] Update dependency flutter_lints to v3 --- pubspec.lock | 8 ++++---- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 5824c1a..bbc34c4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -242,10 +242,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "3.0.1" flutter_test: dependency: "direct dev" description: flutter @@ -340,10 +340,10 @@ packages: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logging: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 3df00e6..5b77d5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: dev_dependencies: build_runner: ^2.0.0 - flutter_lints: ^2.0.0 + flutter_lints: ^3.0.0 flutter_test: sdk: flutter From 45bb77f88cfe821983828f0653e44569c0334cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Petersen?= Date: Thu, 19 Oct 2023 10:18:42 +0200 Subject: [PATCH 2/2] Fix linter errors --- lib/main.dart | 14 +++++++------- lib/motion.dart | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index bf5658b..066df67 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -14,9 +14,9 @@ class MyApp extends StatelessWidget { final String? code; const MyApp({ - Key? key, + super.key, required this.code, - }) : super(key: key); + }); // This widget is the root of your application. @override @@ -44,9 +44,9 @@ class BlocPage extends StatelessWidget { final String? code; const BlocPage({ - Key? key, + super.key, required this.code, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -61,7 +61,7 @@ class BlocPage extends StatelessWidget { } class MainPage extends StatelessWidget { - const MainPage({Key? key}) : super(key: key); + const MainPage({super.key}); @override Widget build(BuildContext context) { @@ -95,7 +95,7 @@ class MainPage extends StatelessWidget { } class SpinContent extends StatelessWidget { - const SpinContent({Key? key}) : super(key: key); + const SpinContent({super.key}); @override Widget build(BuildContext context) { @@ -143,7 +143,7 @@ class SpinContent extends StatelessWidget { } class QrScanner extends StatefulWidget { - const QrScanner({Key? key}) : super(key: key); + const QrScanner({super.key}); @override State createState() => _QrScannerState(); diff --git a/lib/motion.dart b/lib/motion.dart index 3b49bec..8354de6 100644 --- a/lib/motion.dart +++ b/lib/motion.dart @@ -60,11 +60,11 @@ class Motion { final eventListener = _EventListener(controller); controller.onListen = () => window.addEventListener( kDeviceMotionEventType, - eventListener, + eventListener.call, ); controller.onCancel = () => window.removeEventListener( kDeviceMotionEventType, - eventListener, + eventListener.call, ); return controller.stream.listen(handler);