diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1d6fdb --- /dev/null +++ b/.gitignore @@ -0,0 +1,94 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +======= +# These are some examples of commonly ignored file patterns. +# You should customize this list as applicable to your project. +# Learn more about .gitignore: +# https://www.atlassian.com/git/tutorials/saving-changes/gitignore + +# Node artifact files +node_modules/ +dist/ + +# Compiled Java class files +*.class + +# Compiled Python bytecode +*.py[cod] + +# Log files +*.log + +# Package files +*.jar + +# Maven +target/ +dist/ + +# JetBrains IDE +.idea/ + +# Unit test reports +TEST*.xml + +# Generated by MacOS +.DS_Store + +# Generated by Windows +Thumbs.db + +# Applications +*.app +*.exe +*.war + +# Large media files +*.mp4 +*.tiff +*.avi +*.flv +*.mov +*.wmv diff --git a/android/.gitignore b/android/.gitignore index 0a741cb..6f56801 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index b329bcb..6464527 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,21 +26,30 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 29 + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' } - lintOptions { - disable 'InvalidPackage' + sourceSets { + main.java.srcDirs += 'src/main/kotlin' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.ble_testapp" - minSdkVersion 21 - targetSdkVersion 29 + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion Math.max(flutter.minSdkVersion, 21) + compileSdkVersion 33 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -60,5 +69,4 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "com.polidea.rxandroidble2:rxandroidble:1.11.1" } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 261ddbd..8d20183 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,7 @@ - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 123c29d..c41c72a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,16 +1,21 @@ - - + + + + + + + - - diff --git a/android/app/src/main/kotlin/nl/wolffonline/uart_ble/MainActivity.kt b/android/app/src/main/kotlin/nl/wolffonline/uart_ble/MainActivity.kt index a4ea79e..0c2a6f4 100644 --- a/android/app/src/main/kotlin/nl/wolffonline/uart_ble/MainActivity.kt +++ b/android/app/src/main/kotlin/nl/wolffonline/uart_ble/MainActivity.kt @@ -1,23 +1,6 @@ package nl.wolffonline.uart_ble -import androidx.annotation.NonNull import io.flutter.embedding.android.FlutterActivity -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugins.GeneratedPluginRegistrant -import com.polidea.rxandroidble2.exceptions.BleException -import io.reactivex.exceptions.UndeliverableException -import io.reactivex.plugins.RxJavaPlugins -class MainActivity: FlutterActivity(){ - override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { - GeneratedPluginRegistrant.registerWith(flutterEngine) - RxJavaPlugins.setErrorHandler { throwable -> - if (throwable is UndeliverableException && throwable.cause is BleException) { - return@setErrorHandler // ignore BleExceptions since we do not have subscriber - } - else { - throw throwable - } - } - } +class MainActivity: FlutterActivity() { } diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 1f83a33..cb1ef88 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,18 +1,18 @@ - - - diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 261ddbd..8d20183 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,6 +1,7 @@ - diff --git a/android/build.gradle b/android/build.gradle index 3100ad2..83ae220 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.6.10' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +14,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/android/gradle.properties b/android/gradle.properties index a673820..94adc3a 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,3 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -android.enableR8=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 296b146..cb24abd 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/android/uart_ble_android.iml b/android/uart_ble_android.iml deleted file mode 100644 index 1899969..0000000 --- a/android/uart_ble_android.iml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/main.dart b/lib/main.dart index 2c3fab4..3ada73e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,8 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; -import 'package:location_permissions/location_permissions.dart'; +import 'package:permission_handler/permission_handler.dart'; + import 'dart:io' show Platform; // This flutter app demonstrates an usage of the flutter_reactive_ble flutter plugin @@ -29,7 +30,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); + MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); @@ -38,13 +39,13 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { final flutterReactiveBle = FlutterReactiveBle(); List _foundBleUARTDevices = []; - StreamSubscription _scanStream; - Stream _currentConnectionStream; - StreamSubscription _connection; - QualifiedCharacteristic _txCharacteristic; - QualifiedCharacteristic _rxCharacteristic; - Stream> _receivedDataStream; - TextEditingController _dataToSendText; + StreamSubscription? _scanStream; + Stream? _currentConnectionStream; + StreamSubscription? _connection; + QualifiedCharacteristic? _txCharacteristic; + QualifiedCharacteristic? _rxCharacteristic; + Stream>? _receivedDataStream; + TextEditingController? _dataToSendText; bool _scanning = false; bool _connected = false; String _logTexts = ""; @@ -61,7 +62,7 @@ class _MyHomePageState extends State { } void _sendData() async { - await flutterReactiveBle.writeCharacteristicWithResponse(_rxCharacteristic, value: _dataToSendText.text.codeUnits); + await flutterReactiveBle.writeCharacteristicWithResponse(_rxCharacteristic!, value: _dataToSendText!.text.codeUnits); } void onNewReceivedData(List data) { @@ -74,51 +75,83 @@ class _MyHomePageState extends State { } void _disconnect() async { - await _connection.cancel(); + await _connection!.cancel(); _connected = false; refreshScreen(); } void _stopScan() async { - await _scanStream.cancel(); + await _scanStream!.cancel(); _scanning = false; refreshScreen(); } Future showNoPermissionDialog() async => showDialog( - context: context, - barrierDismissible: false, // user must tap button! - builder: (BuildContext context) => AlertDialog( - title: const Text('No location permission '), - content: SingleChildScrollView( - child: ListBody( - children: [ - const Text('No location permission granted.'), - const Text('Location permission is required for BLE to function.'), - ], - ), - ), - actions: [ - TextButton( - child: const Text('Acknowledge'), - onPressed: () { - Navigator.of(context).pop(); - }, - ), + context: context, + barrierDismissible: false, // user must tap button! + builder: (BuildContext context) => AlertDialog( + title: const Text('No location permission '), + content: SingleChildScrollView( + child: ListBody( + children: [ + const Text('No location permission granted.'), + const Text('Location permission is required for BLE to function.'), ], ), - ); + ), + actions: [ + TextButton( + child: const Text('Acknowledge'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ), + ); - void _startScan() async { - bool goForIt=false; - PermissionStatus permission; + Future checkAndroidBLEPermissions() async { if (Platform.isAndroid) { - permission = await LocationPermissions().requestPermissions(); - if (permission == PermissionStatus.granted) - goForIt=true; - } else if (Platform.isIOS) { - goForIt=true; + bool isLocation = true, + isBlScan = true, + isBlAdvertise = true, + isBleConn = true; + + Map statuses = await [ + Permission.location, + Permission.bluetoothScan, + Permission.bluetoothAdvertise, + Permission.bluetoothConnect + ].request(); + for (var status in statuses.entries) { + if (status.key == Permission.location) { + if (!status.value.isGranted) + isLocation = false; + } else if (status.key == Permission.bluetoothScan) { + if (!status.value.isGranted) + isBlScan = false; + } else if (status.key == Permission.bluetoothAdvertise) { + if (!status.value.isGranted) + isBlAdvertise = false; + } else if (status.key == Permission.bluetoothConnect) { + if (!status.value.isGranted) + isBleConn = false; + } + + if (isLocation == false || + isBlScan == false || + isBlAdvertise == false || + isBleConn == false) { + return Future.value(false); + } + } } + return Future.value(true); + } + + void _startScan() async { + bool goForIt = await checkAndroidBLEPermissions(); + if (goForIt) { //TODO replace True with permission == PermissionStatus.granted is for IOS test _foundBleUARTDevices = []; _scanning = true; @@ -133,7 +166,7 @@ class _MyHomePageState extends State { } }, onError: (Object error) { _logTexts = - "${_logTexts}ERROR while scanning:$error \n"; + "${_logTexts}ERROR while scanning:$error \n"; refreshScreen(); } ); @@ -151,7 +184,7 @@ class _MyHomePageState extends State { ); _logTexts = ""; refreshScreen(); - _connection = _currentConnectionStream.listen((event) { + _connection = _currentConnectionStream!.listen((event) { var id = event.deviceId.toString(); switch(event.connectionState) { case DeviceConnectionState.connecting: @@ -166,9 +199,9 @@ class _MyHomePageState extends State { _numberOfMessagesReceived = 0; _receivedData = []; _txCharacteristic = QualifiedCharacteristic(serviceId: _UART_UUID, characteristicId: _UART_TX, deviceId: event.deviceId); - _receivedDataStream = flutterReactiveBle.subscribeToCharacteristic(_txCharacteristic); - _receivedDataStream.listen((data) { - onNewReceivedData(data); + _receivedDataStream = flutterReactiveBle.subscribeToCharacteristic(_txCharacteristic!); + _receivedDataStream!.listen((data) { + onNewReceivedData(data); }, onError: (dynamic error) { _logTexts = "${_logTexts}Error:$error$id\n"; }); @@ -193,147 +226,147 @@ class _MyHomePageState extends State { @override Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - const Text("BLE UART Devices found:"), - Container( - margin: const EdgeInsets.all(3.0), + appBar: AppBar( + title: Text(widget.title), + ), + body: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + const Text("BLE UART Devices found:"), + Container( + margin: const EdgeInsets.all(3.0), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - border: Border.all( - color: Colors.blue, - width:2 - ) + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: Colors.blue, + width:2 + ) ), height: 100, child: ListView.builder( itemCount: _foundBleUARTDevices.length, itemBuilder: (context, index) => Card( - child: ListTile( - dense: true, - enabled: !((!_connected && _scanning) || (!_scanning && _connected)), - trailing: GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - (!_connected && _scanning) || (!_scanning && _connected)? (){}: onConnectDevice(index); - }, - child: Container( - width: 48, - height: 48, - padding: const EdgeInsets.symmetric(vertical: 4.0), - alignment: Alignment.center, - child: const Icon(Icons.add_link), - ), + child: ListTile( + dense: true, + enabled: !((!_connected && _scanning) || (!_scanning && _connected)), + trailing: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + (!_connected && _scanning) || (!_scanning && _connected)? (){}: onConnectDevice(index); + }, + child: Container( + width: 48, + height: 48, + padding: const EdgeInsets.symmetric(vertical: 4.0), + alignment: Alignment.center, + child: const Icon(Icons.add_link), ), - subtitle: Text(_foundBleUARTDevices[index].id), - title: Text("$index: ${_foundBleUARTDevices[index].name}"), - )) + ), + subtitle: Text(_foundBleUARTDevices[index].id), + title: Text("$index: ${_foundBleUARTDevices[index].name}"), + )) ) - ), - const Text("Status messages:"), - Container( - margin: const EdgeInsets.all(3.0), - width:1400, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - border: Border.all( - color: Colors.blue, - width:2 + ), + const Text("Status messages:"), + Container( + margin: const EdgeInsets.all(3.0), + width:1400, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: Colors.blue, + width:2 ) - ), - height: 90, - child: Scrollbar( + ), + height: 90, + child: Scrollbar( - child: SingleChildScrollView( + child: SingleChildScrollView( child: Text(_logTexts) - ) - ) - ), - const Text("Received data:"), - Container( - margin: const EdgeInsets.all(3.0), - width:1400, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - border: Border.all( - color: Colors.blue, - width:2 - ) - ), - height: 90, - child: Text(_receivedData.join("\n")) - ), - const Text("Send message:"), - Container( - margin: const EdgeInsets.all(3.0), - padding: const EdgeInsets.all(8.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - border: Border.all( - color: Colors.blue, - width:2 - ) - ), - child: Row( - children: [ - Expanded( - child: TextField( - enabled: _connected, - controller: _dataToSendText, - decoration: const InputDecoration( + ) + ) + ), + const Text("Received data:"), + Container( + margin: const EdgeInsets.all(3.0), + width:1400, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: Colors.blue, + width:2 + ) + ), + height: 90, + child: Text(_receivedData.join("\n")) + ), + const Text("Send message:"), + Container( + margin: const EdgeInsets.all(3.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: Colors.blue, + width:2 + ) + ), + child: Row( + children: [ + Expanded( + child: TextField( + enabled: _connected, + controller: _dataToSendText, + decoration: const InputDecoration( border: InputBorder.none, hintText: 'Enter a string' ), ) - ), - RaisedButton( - child: Icon( - Icons.send, - color:_connected ? Colors.blue : Colors.grey, - ), - onPressed: _connected ? _sendData: (){} - ), - ] - )) - ], - ), + ), + ElevatedButton( + child: Icon( + Icons.send, + color:_connected ? Colors.blue : Colors.grey, + ), + onPressed: _connected ? _sendData: (){} + ), + ] + )) + ], ), - persistentFooterButtons: [ - Container( - height: 35, - child: Column( - children: [ - if (_scanning) const Text("Scanning: Scanning") else const Text("Scanning: Idle"), - if (_connected) const Text("Connected") else const Text("disconnected."), - ], - ) , - ), - RaisedButton( - onPressed: !_scanning && !_connected ? _startScan : (){}, - child: Icon( - Icons.play_arrow, - color: !_scanning && !_connected ? Colors.blue: Colors.grey, - ), + ), + persistentFooterButtons: [ + Container( + height: 35, + child: Column( + children: [ + if (_scanning) const Text("Scanning: Scanning") else const Text("Scanning: Idle"), + if (_connected) const Text("Connected") else const Text("disconnected."), + ], + ) , + ), + ElevatedButton( + onPressed: !_scanning && !_connected ? _startScan : (){}, + child: Icon( + Icons.play_arrow, + color: !_scanning && !_connected ? Colors.blue: Colors.grey, ), - RaisedButton( + ), + ElevatedButton( onPressed: _scanning ? _stopScan: (){}, child: Icon( Icons.stop, color:_scanning ? Colors.blue: Colors.grey, ) - ), - RaisedButton( - onPressed: _connected ? _disconnect: (){}, - child: Icon( - Icons.cancel, - color:_connected ? Colors.blue:Colors.grey, - ) - ) - ], - ); + ), + ElevatedButton( + onPressed: _connected ? _disconnect: (){}, + child: Icon( + Icons.cancel, + color:_connected ? Colors.blue:Colors.grey, + ) + ) + ], + ); } diff --git a/pubspec.lock b/pubspec.lock index 765ec83..21e3135 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,63 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.9.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.5" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.3.1" fixnum: dependency: transitive description: name: fixnum url: "https://pub.dartlang.org" source: hosted - version: "0.10.11" + version: "1.0.1" flutter: dependency: "direct main" description: flutter @@ -75,7 +68,7 @@ packages: name: flutter_reactive_ble url: "https://pub.dartlang.org" source: hosted - version: "2.7.1" + version: "5.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -87,56 +80,98 @@ packages: name: functional_data url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" - location_permissions: - dependency: "direct main" + version: "1.0.0" + matcher: + dependency: transitive description: - name: location_permissions + name: matcher url: "https://pub.dartlang.org" source: hosted - version: "3.0.0+1" - matcher: + version: "0.12.12" + material_color_utilities: dependency: transitive description: - name: matcher + name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" - pedantic: + version: "1.8.2" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + url: "https://pub.dartlang.org" + source: hosted + version: "10.0.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + url: "https://pub.dartlang.org" + source: hosted + version: "10.0.0" + permission_handler_apple: dependency: transitive description: - name: pedantic + name: permission_handler_apple url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" - plain_optional: + version: "9.0.4" + permission_handler_platform_interface: dependency: transitive description: - name: plain_optional + name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "3.7.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" protobuf: dependency: transitive description: name: protobuf url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "2.1.0" + reactive_ble_mobile: + dependency: transitive + description: + name: reactive_ble_mobile + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.2" + reactive_ble_platform_interface: + dependency: transitive + description: + name: reactive_ble_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.2" sky_engine: dependency: transitive description: flutter @@ -148,56 +183,49 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0-nullsafety.3" + version: "0.4.12" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.2" sdks: - dart: ">=2.10.0-110 <2.11.0" - flutter: ">=1.12.8 <2.0.0" + dart: ">=2.18.0 <3.0.0" + flutter: ">=2.8.0" diff --git a/pubspec.yaml b/pubspec.yaml index d799b6c..c545de0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,14 +4,14 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: '>=2.18.0 <3.0.0' dependencies: flutter: sdk: flutter - cupertino_icons: ^1.0.0 - flutter_reactive_ble: ^2.7.1 - location_permissions: ^3.0.0+1 + cupertino_icons: ^1.0.5 + flutter_reactive_ble: ^5.0.2 + permission_handler: ^10.0.0 dev_dependencies: flutter_test: