From 4d489d511a43372186494e8a1186407afbbe978e Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Wed, 25 May 2022 00:25:16 +0200 Subject: [PATCH] fixed analyzer --- example/lib/main.dart | 10 +++++----- example/pubspec.yaml | 15 +++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 9bff24e..5083f01 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -8,10 +8,10 @@ void main() { } class MyApp extends StatelessWidget { - MyApp() { + MyApp({Key? key}) : super(key: key) { Logger.root.level = Level.FINEST; Logger.root.onRecord.listen((LogRecord rec) { - print( + debugPrint( '[${rec.time}][${rec.level.name}][${rec.loggerName}] ${rec.message}', ); }); @@ -29,7 +29,7 @@ class MyApp extends StatelessWidget { theme: ThemeData( primarySwatch: Colors.blue, ), - home: MyHomePage(title: 'Matomo Example'), + home: const MyHomePage(title: 'Matomo Example'), ); } } @@ -68,7 +68,7 @@ class _MyHomePageState extends State with TraceableClientMixin { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( + const Text( 'You have pushed the button this many times:', ), Text( @@ -81,7 +81,7 @@ class _MyHomePageState extends State with TraceableClientMixin { floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', - child: Icon(Icons.add), + child: const Icon(Icons.add), ), ); } diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 3ea34cd..7991484 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -21,23 +21,22 @@ environment: sdk: ">=2.12.0 <3.0.0" dependencies: - flutter: - sdk: flutter - matomo_tracker: - path: ../ - # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + flutter: + sdk: flutter + matomo_tracker: + path: ../ dev_dependencies: + flutter_lints: ^1.0.4 flutter_test: sdk: flutter # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec - # The following section is specific to Flutter. flutter: @@ -45,18 +44,14 @@ flutter: # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg - # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. - # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages - # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a