From e3bea0e79c872052311c4fe7be0c45544e65e6f2 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Thu, 26 Sep 2024 11:41:55 +0200 Subject: [PATCH] fix lints --- bluetooth_flutter_blue/lib/src/flutter_blue_import.dart | 2 +- bluetooth_server/lib/src/bluetooth_server.dart | 1 - bluetooth_server/lib/src/bluetooth_server_client.dart | 1 - bluetooth_server_app/lib/page/main_page.dart | 2 +- bluetooth_server_app/lib/src/prefs.dart | 4 ++-- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bluetooth_flutter_blue/lib/src/flutter_blue_import.dart b/bluetooth_flutter_blue/lib/src/flutter_blue_import.dart index d4ae403..f407a16 100644 --- a/bluetooth_flutter_blue/lib/src/flutter_blue_import.dart +++ b/bluetooth_flutter_blue/lib/src/flutter_blue_import.dart @@ -37,7 +37,7 @@ extension FlutterBluePlusPrvExt on FlutterBluePlus { ); Future scanComplete = - FlutterBluePlus.isScanning.where((e) => e == false).first; + FlutterBluePlus.isScanning.where((e) => !e).first; scanComplete.whenComplete(() { subscription.cancel(); diff --git a/bluetooth_server/lib/src/bluetooth_server.dart b/bluetooth_server/lib/src/bluetooth_server.dart index 1602440..7af94d8 100644 --- a/bluetooth_server/lib/src/bluetooth_server.dart +++ b/bluetooth_server/lib/src/bluetooth_server.dart @@ -10,7 +10,6 @@ import 'package:tekartik_bluetooth_server/src/constant.dart'; import 'package:tekartik_common_utils/common_utils_import.dart'; import 'package:tekartik_web_socket_io/web_socket_io.dart'; -import 'import.dart'; typedef BluetoothServerNotifyCallback = void Function( bool response, String method, dynamic params); diff --git a/bluetooth_server/lib/src/bluetooth_server_client.dart b/bluetooth_server/lib/src/bluetooth_server_client.dart index a613a52..1181e3c 100644 --- a/bluetooth_server/lib/src/bluetooth_server_client.dart +++ b/bluetooth_server/lib/src/bluetooth_server_client.dart @@ -7,7 +7,6 @@ import 'package:tekartik_bluetooth_server/src/constant.dart'; import 'package:tekartik_common_utils/common_utils_import.dart'; import 'package:tekartik_web_socket_io/web_socket_io.dart'; -import 'import.dart'; class ServerInfo { bool? isIOS; diff --git a/bluetooth_server_app/lib/page/main_page.dart b/bluetooth_server_app/lib/page/main_page.dart index 029fbb0..f8fb113 100644 --- a/bluetooth_server_app/lib/page/main_page.dart +++ b/bluetooth_server_app/lib/page/main_page.dart @@ -197,7 +197,7 @@ class _BluetoothServerHomePageState extends State { try { var server = await app.startServer(port, notifyCallback: (bool response, String method, dynamic param) { - if (response == false) { + if (!response) { if (method == methodBluetooth) { var paramsMap = param as Map; var bluetoothMethod = paramsMap['method'] as String?; diff --git a/bluetooth_server_app/lib/src/prefs.dart b/bluetooth_server_app/lib/src/prefs.dart index bfc0ec2..405d71f 100644 --- a/bluetooth_server_app/lib/src/prefs.dart +++ b/bluetooth_server_app/lib/src/prefs.dart @@ -90,13 +90,13 @@ class Prefs { } Future setShowConsole(bool showConsole) async { - this.showConsole = showConsole != false; + this.showConsole = showConsole; var intValue = this.showConsole ? 1 : 0; await _setIntValue('showConsole', intValue); } Future setAutoStart(bool autoStart) async { - this.autoStart = autoStart == true; + this.autoStart = autoStart; var intValue = this.autoStart ? 1 : 0; await _setIntValue('autoStart', intValue); }