From a6ee943654d533a8d921fe086139003e6406628e Mon Sep 17 00:00:00 2001 From: MrCsabaToth Date: Sat, 23 Jul 2022 21:26:29 -0700 Subject: [PATCH] Improve linter results (Fixes several in https://github.com/boskokg/flutter_blue_plus/issues/98) --- analysis_options.yaml | 6 ++++++ example/lib/main.dart | 2 +- example/pubspec.lock | 2 +- lib/src/guid.dart | 2 +- pubspec.yaml | 6 +++--- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index a5744c1c..4d60708b 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -2,3 +2,9 @@ include: package:flutter_lints/flutter.yaml # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options + +analyzer: + exclude: + - /**.pbjson.dart + - /**.pb.dart + - /**.pbenum.dart diff --git a/example/lib/main.dart b/example/lib/main.dart index 2b1082a7..bd02878a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -349,7 +349,7 @@ class DeviceScreen extends StatelessWidget { }); while (isConnected) { yield await device.readRssi(); - await Future.delayed(Duration(seconds: 1)); + await Future.delayed(const Duration(seconds: 1)); } subscription.cancel(); // Device disconnected, stopping RSSI stream diff --git a/example/pubspec.lock b/example/pubspec.lock index 163f5f5b..dccd46e6 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -143,7 +143,7 @@ packages: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.27.3" + version: "0.27.5" sky_engine: dependency: transitive description: flutter diff --git a/lib/src/guid.dart b/lib/src/guid.dart index f017c47f..83c55a31 100644 --- a/lib/src/guid.dart +++ b/lib/src/guid.dart @@ -23,7 +23,7 @@ class Guid { final bytes = hex.decode(input); if (bytes.length != 6) { - throw FormatException("The format is invalid: " + input); + throw FormatException("The format is invalid: $input"); } return bytes + List.filled(10, 0); diff --git a/pubspec.yaml b/pubspec.yaml index 7461ee4f..01524c48 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,14 +12,14 @@ dependencies: sdk: flutter convert: ^3.0.1 protobuf: ^2.0.1 - rxdart: ^0.27.3 + rxdart: ^0.27.5 collection: ^1.15.0 - meta: ^1.3.0 + meta: ^1.7.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.4 + flutter_lints: ^2.0.1 flutter: plugin: