From d7b3b9ea7bf02b49cfffc9d304079a08973b3170 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] 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);