From ccc0298bc2331c3043fbc0399342d454758af60f Mon Sep 17 00:00:00 2001 From: Rutger Vromans Date: Wed, 28 Jun 2023 16:05:57 -0700 Subject: [PATCH] Add connectability from discovery data (#750) * Update dependencies, set ruby version and run codegen * Add IsConnectable support for Android and iOS * iOS Project updates * Set melos to fixed version * Add tests * Keep bledata protos number in order --------- Co-authored-by: RutgerVromans --- .ruby-version | 1 + README.md | 2 +- bin/quality_checks.sh | 2 +- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Podfile | 2 +- example/ios/Podfile.lock | 6 +- example/ios/Runner.xcodeproj/project.pbxproj | 17 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/Info.plist | 12 +- .../device_detail/device_detail_screen.dart | 2 +- .../device_detail/device_interaction_tab.dart | 12 +- .../device_interaction_tab.g.dart | 20 +- example/lib/src/ui/device_list.dart | 22 +- example/lib/src/widgets.dart | 4 +- example/pubspec.lock | 347 ++- example/pubspec.yaml | 4 +- packages/flutter_reactive_ble/pubspec.lock | 299 +- packages/flutter_reactive_ble/pubspec.yaml | 2 +- ...connected_device_operation_test.mocks.dart | 317 +- .../test/device_connector_test.dart | 1 + .../test/device_connector_test.mocks.dart | 417 ++- .../test/device_scanner_test.dart | 2 + .../test/device_scanner_test.mocks.dart | 317 +- .../test/reactive_ble_test.dart | 1 + .../test/reactive_ble_test.mocks.dart | 578 ++-- .../hue/flutterreactiveble/ble/BleWrapper.kt | 10 +- .../ble/ReactiveBleClient.kt | 6 + .../converters/ProtobufMessageConverter.kt | 3 + .../ProtobufMessageConverterTest.kt | 17 +- .../ios/Classes/BleData/bledata.pb.swift | 244 +- .../ios/Classes/Plugin/PluginController.swift | 14 +- .../converter/args_to_protubuf_converter.dart | 2 +- .../lib/src/converter/protobuf_converter.dart | 14 + .../lib/src/generated/bledata.pb.dart | 2625 +++++------------ .../lib/src/generated/bledata.pbenum.dart | 11 + .../lib/src/generated/bledata.pbjson.dart | 447 +++ .../lib/src/generated/bledata.pbserver.dart | 14 + .../reactive_ble_mobile/protos/bledata.proto | 5 + packages/reactive_ble_mobile/pubspec.lock | 288 +- packages/reactive_ble_mobile/pubspec.yaml | 2 +- .../converter/protobuf_converter_test.dart | 32 +- .../test/reactive_ble_platform_test.dart | 1 + .../reactive_ble_platform_test.mocks.dart | 692 ++++- .../lib/src/model/discovered_device.dart | 7 + .../lib/src/model/discovered_device.g.dart | 19 +- .../pubspec.lock | 296 +- .../pubspec.yaml | 2 +- 47 files changed, 4097 insertions(+), 3045 deletions(-) create mode 100644 .ruby-version create mode 100644 packages/reactive_ble_mobile/lib/src/generated/bledata.pbenum.dart create mode 100644 packages/reactive_ble_mobile/lib/src/generated/bledata.pbjson.dart create mode 100644 packages/reactive_ble_mobile/lib/src/generated/bledata.pbserver.dart diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..57cf282e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.6.5 diff --git a/README.md b/README.md index 8638223a..5901ae35 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Feel free to open an new issue or a pull request to make this project better This project uses melos to manage all the packages inside this repo. -Install melos: `dart pub global activate melos` +Install melos: `dart pub global activate melos 2.9.0` Setup melos to point to the dependencies in your local folder: `melos bootstrap` ### Android diff --git a/bin/quality_checks.sh b/bin/quality_checks.sh index 25a89370..4742ac24 100755 --- a/bin/quality_checks.sh +++ b/bin/quality_checks.sh @@ -4,7 +4,7 @@ echo 'export PATH="$PATH":"$FLUTTER_ROOT/.pub-cache/bin"' >>~/.bashrc echo 'export PATH="$PATH":"$FLUTTER_ROOT/bin"' >>~/.bashrc source ~/.bashrc -dart pub global activate melos +dart pub global activate melos 2.9.0 melos bootstrap melos run analyze diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 8d4492f9..9625e105 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/example/ios/Podfile b/example/ios/Podfile index 1e8c3c90..88359b22 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 3ffa835d..4bcfd06e 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -23,11 +23,11 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/reactive_ble_mobile/ios" SPEC CHECKSUMS: - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Protobuf: 1a37ebea1338949e9ac35a3f06e80b3f536eec8d reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c SwiftProtobuf: 9c85136c6ba74b0a1b84279dbf0f6db8efb714e0 -PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 -COCOAPODS: 1.11.2 +COCOAPODS: 1.10.1 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 9c6f2694..6bf26a88 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -161,7 +161,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -207,10 +207,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -221,6 +223,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -432,7 +435,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -459,7 +465,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e4f93ede..a69542ed 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion en CFBundleExecutable @@ -22,6 +24,12 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + NSBluetoothAlwaysUsageDescription + The app uses bluetooth to find, connect and transfer data between different devices + NSBluetoothPeripheralUsageDescription + The app uses bluetooth to find, connect and transfer data between different devices + UIApplicationSupportsIndirectInputEvents + UIBackgroundModes bluetooth-central @@ -45,9 +53,5 @@ UIViewControllerBasedStatusBarAppearance - NSBluetoothAlwaysUsageDescription - The app uses bluetooth to find, connect and transfer data between different devices - NSBluetoothPeripheralUsageDescription - The app uses bluetooth to find, connect and transfer data between different devices diff --git a/example/lib/src/ui/device_detail/device_detail_screen.dart b/example/lib/src/ui/device_detail/device_detail_screen.dart index 4a9df0b8..b5e50369 100644 --- a/example/lib/src/ui/device_detail/device_detail_screen.dart +++ b/example/lib/src/ui/device_detail/device_detail_screen.dart @@ -39,7 +39,7 @@ class _DeviceDetail extends StatelessWidget { length: 2, child: Scaffold( appBar: AppBar( - title: Text(device.name), + title: Text(device.name.isNotEmpty ? device.name : "Unnamed"), bottom: const TabBar( tabs: [ Tab( diff --git a/example/lib/src/ui/device_detail/device_interaction_tab.dart b/example/lib/src/ui/device_detail/device_interaction_tab.dart index 4abe66d0..0fa648a5 100644 --- a/example/lib/src/ui/device_detail/device_interaction_tab.dart +++ b/example/lib/src/ui/device_detail/device_interaction_tab.dart @@ -26,6 +26,7 @@ class DeviceInteractionTab extends StatelessWidget { _DeviceInteractionTab( viewModel: DeviceInteractionViewModel( deviceId: device.id, + connectableStatus: device.connectable, connectionStatus: connectionStateUpdate.connectionState, deviceConnector: deviceConnector, discoverServices: () => @@ -39,12 +40,14 @@ class DeviceInteractionTab extends StatelessWidget { class DeviceInteractionViewModel extends $DeviceInteractionViewModel { const DeviceInteractionViewModel({ required this.deviceId, + required this.connectableStatus, required this.connectionStatus, required this.deviceConnector, required this.discoverServices, }); final String deviceId; + final Connectable connectableStatus; final DeviceConnectionState connectionStatus; final BleDeviceConnector deviceConnector; @CustomEquality(Ignore()) @@ -107,7 +110,14 @@ class _DeviceInteractionTabState extends State<_DeviceInteractionTab> { Padding( padding: const EdgeInsetsDirectional.only(start: 16.0), child: Text( - "Status: ${widget.viewModel.connectionStatus}", + "Connectable: ${widget.viewModel.connectableStatus}", + style: const TextStyle(fontWeight: FontWeight.bold), + ), + ), + Padding( + padding: const EdgeInsetsDirectional.only(start: 16.0), + child: Text( + "Connection: ${widget.viewModel.connectionStatus}", style: const TextStyle(fontWeight: FontWeight.bold), ), ), diff --git a/example/lib/src/ui/device_detail/device_interaction_tab.g.dart b/example/lib/src/ui/device_detail/device_interaction_tab.g.dart index 994c9cce..4a87f0c4 100644 --- a/example/lib/src/ui/device_detail/device_interaction_tab.g.dart +++ b/example/lib/src/ui/device_detail/device_interaction_tab.g.dart @@ -10,18 +10,21 @@ abstract class $DeviceInteractionViewModel { const $DeviceInteractionViewModel(); String get deviceId; + Connectable get connectableStatus; DeviceConnectionState get connectionStatus; BleDeviceConnector get deviceConnector; Future> Function() get discoverServices; DeviceInteractionViewModel copyWith({ String? deviceId, + Connectable? connectableStatus, DeviceConnectionState? connectionStatus, BleDeviceConnector? deviceConnector, Future> Function()? discoverServices, }) => DeviceInteractionViewModel( deviceId: deviceId ?? this.deviceId, + connectableStatus: connectableStatus ?? this.connectableStatus, connectionStatus: connectionStatus ?? this.connectionStatus, deviceConnector: deviceConnector ?? this.deviceConnector, discoverServices: discoverServices ?? this.discoverServices, @@ -31,6 +34,7 @@ abstract class $DeviceInteractionViewModel { void Function(DeviceInteractionViewModel$Change change) mutator) { final change = DeviceInteractionViewModel$Change._( this.deviceId, + this.connectableStatus, this.connectionStatus, this.deviceConnector, this.discoverServices, @@ -38,6 +42,7 @@ abstract class $DeviceInteractionViewModel { mutator(change); return DeviceInteractionViewModel( deviceId: change.deviceId, + connectableStatus: change.connectableStatus, connectionStatus: change.connectionStatus, deviceConnector: change.deviceConnector, discoverServices: change.discoverServices, @@ -46,7 +51,7 @@ abstract class $DeviceInteractionViewModel { @override String toString() => - "DeviceInteractionViewModel(deviceId: $deviceId, connectionStatus: $connectionStatus, deviceConnector: $deviceConnector, discoverServices: $discoverServices)"; + "DeviceInteractionViewModel(deviceId: $deviceId, connectableStatus: $connectableStatus, connectionStatus: $connectionStatus, deviceConnector: $deviceConnector, discoverServices: $discoverServices)"; @override // ignore: avoid_equals_and_hash_code_on_mutable_classes @@ -54,6 +59,7 @@ abstract class $DeviceInteractionViewModel { other is DeviceInteractionViewModel && other.runtimeType == runtimeType && deviceId == other.deviceId && + connectableStatus == other.connectableStatus && connectionStatus == other.connectionStatus && deviceConnector == other.deviceConnector && const Ignore().equals(discoverServices, other.discoverServices); @@ -63,6 +69,7 @@ abstract class $DeviceInteractionViewModel { int get hashCode { var result = 17; result = 37 * result + deviceId.hashCode; + result = 37 * result + connectableStatus.hashCode; result = 37 * result + connectionStatus.hashCode; result = 37 * result + deviceConnector.hashCode; result = 37 * result + const Ignore().hash(discoverServices); @@ -73,12 +80,14 @@ abstract class $DeviceInteractionViewModel { class DeviceInteractionViewModel$Change { DeviceInteractionViewModel$Change._( this.deviceId, + this.connectableStatus, this.connectionStatus, this.deviceConnector, this.discoverServices, ); String deviceId; + Connectable connectableStatus; DeviceConnectionState connectionStatus; BleDeviceConnector deviceConnector; Future> Function() discoverServices; @@ -92,6 +101,15 @@ class DeviceInteractionViewModel$ { deviceIdContainer.copyWith(deviceId: deviceId), ); + static final connectableStatus = + Lens( + (connectableStatusContainer) => + connectableStatusContainer.connectableStatus, + (connectableStatusContainer, connectableStatus) => + connectableStatusContainer.copyWith( + connectableStatus: connectableStatus), + ); + static final connectionStatus = Lens( (connectionStatusContainer) => connectionStatusContainer.connectionStatus, diff --git a/example/lib/src/ui/device_list.dart b/example/lib/src/ui/device_list.dart index a3fb5821..35e6b3c4 100644 --- a/example/lib/src/ui/device_list.dart +++ b/example/lib/src/ui/device_list.dart @@ -153,16 +153,26 @@ class _DeviceListState extends State<_DeviceList> { ...widget.scannerState.discoveredDevices .map( (device) => ListTile( - title: Text(device.name), - subtitle: Text("${device.id}\nRSSI: ${device.rssi}"), + title: Text( + device.name.isNotEmpty ? device.name : "Unnamed", + ), + subtitle: Text( + """ +${device.id} +RSSI: ${device.rssi} +${device.connectable} + """, + ), leading: const BluetoothIcon(), onTap: () async { widget.stopScan(); await Navigator.push( - context, - MaterialPageRoute( - builder: (_) => - DeviceDetailScreen(device: device))); + context, + MaterialPageRoute( + builder: (_) => + DeviceDetailScreen(device: device), + ), + ); }, ), ) diff --git a/example/lib/src/widgets.dart b/example/lib/src/widgets.dart index a6ec0672..426b5bb8 100644 --- a/example/lib/src/widgets.dart +++ b/example/lib/src/widgets.dart @@ -5,8 +5,8 @@ class BluetoothIcon extends StatelessWidget { @override Widget build(BuildContext context) => const SizedBox( - width: 64, - height: 64, + width: 32, + height: 32, child: Align(alignment: Alignment.center, child: Icon(Icons.bluetooth)), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index 380347f7..dc8acdf9 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,191 +5,202 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" source: hosted - version: "22.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" source: hosted - version: "1.7.2" + version: "5.13.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.0" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.2.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.4.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + url: "https://pub.dev" source: hosted - version: "7.2.2" + version: "7.2.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "8.6.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "2.0.3" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.5.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.3.1" dependency_validator: dependency: "direct dev" description: name: dependency_validator - url: "https://pub.dartlang.org" + sha256: "08349175533ed0bd06eb9b6043cde66c45b2bfc7ebc222a7542cdb1324f1bf03" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.2" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -199,7 +210,8 @@ packages: dependency: "direct main" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + url: "https://pub.dev" source: hosted version: "1.0.4" flutter_reactive_ble: @@ -218,191 +230,210 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "3.2.0" functional_data: dependency: "direct main" description: name: functional_data - url: "https://pub.dartlang.org" + sha256: aefdec4365452283b2a7cf420a3169654d51d3e9553069a22d76680d7a9d7c3d + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" functional_data_generator: dependency: "direct dev" description: name: functional_data_generator - url: "https://pub.dartlang.org" + sha256: dc5df76840dd5951624648b8c56514b4c500dd5ba1cd00cfe5d61972feb3f3b5 + url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.5" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.3.1" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.8.1" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + url: "https://pub.dev" source: hosted version: "1.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.4" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.5.1" protobuf: dependency: transitive description: name: protobuf - url: "https://pub.dartlang.org" + sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" provider: dependency: "direct main" description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.0.5" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.3" reactive_ble_mobile: dependency: "direct overridden" description: @@ -421,16 +452,18 @@ packages: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -440,100 +473,114 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.5.1" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=1.16.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 6477e858..c250a99b 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: provider: ^6.0.1 dev_dependencies: - build_runner: ^2.1.4 + build_runner: ^2.3.3 dependency_validator: ^3.1.0 flutter_test: sdk: flutter @@ -29,6 +29,8 @@ dependency_overrides: path: ../packages/flutter_reactive_ble reactive_ble_mobile: path: ../packages/reactive_ble_mobile + reactive_ble_platform_interface: + path: ../packages/reactive_ble_platform_interface flutter: uses-material-design: true diff --git a/packages/flutter_reactive_ble/pubspec.lock b/packages/flutter_reactive_ble/pubspec.lock index 39d154e9..9b128045 100644 --- a/packages/flutter_reactive_ble/pubspec.lock +++ b/packages/flutter_reactive_ble/pubspec.lock @@ -5,170 +5,194 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" source: hosted - version: "47.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "5.13.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "2.2.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + url: "https://pub.dev" source: hosted - version: "8.4.2" + version: "8.6.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -178,7 +202,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + url: "https://pub.dev" source: hosted version: "1.0.4" flutter_test: @@ -190,170 +215,194 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" functional_data: dependency: "direct main" description: name: functional_data - url: "https://pub.dartlang.org" + sha256: aefdec4365452283b2a7cf420a3169654d51d3e9553069a22d76680d7a9d7c3d + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" functional_data_generator: dependency: "direct dev" description: name: functional_data_generator - url: "https://pub.dartlang.org" + sha256: dc5df76840dd5951624648b8c56514b4c500dd5ba1cd00cfe5d61972feb3f3b5 + url: "https://pub.dev" source: hosted - version: "1.1.4" + version: "1.1.5" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.8.1" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + url: "https://pub.dev" source: hosted version: "1.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: "direct main" description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" mockito: dependency: "direct dev" description: name: mockito - url: "https://pub.dartlang.org" + sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" protobuf: dependency: transitive description: name: protobuf - url: "https://pub.dartlang.org" + sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" + url: "https://pub.dev" source: hosted version: "2.1.0" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.3" reactive_ble_mobile: dependency: "direct main" description: @@ -372,16 +421,18 @@ packages: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -391,100 +442,114 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.5.1" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=2.0.0" diff --git a/packages/flutter_reactive_ble/pubspec.yaml b/packages/flutter_reactive_ble/pubspec.yaml index 77d3b91e..0901842f 100644 --- a/packages/flutter_reactive_ble/pubspec.yaml +++ b/packages/flutter_reactive_ble/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: reactive_ble_mobile: ^5.0.3 reactive_ble_platform_interface: ^5.0.3 dev_dependencies: - build_runner: ^2.1.2 + build_runner: ^2.3.3 flutter_lints: ^1.0.4 flutter_test: sdk: flutter diff --git a/packages/flutter_reactive_ble/test/connected_device_operation_test.mocks.dart b/packages/flutter_reactive_ble/test/connected_device_operation_test.mocks.dart index 9c41dbbf..f639f72b 100644 --- a/packages/flutter_reactive_ble/test/connected_device_operation_test.mocks.dart +++ b/packages/flutter_reactive_ble/test/connected_device_operation_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in flutter_reactive_ble/test/connected_device_operation_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'package:mockito/mockito.dart' as _i1; @@ -9,6 +10,7 @@ import 'package:reactive_ble_platform_interface/src/models.dart' as _i2; import 'package:reactive_ble_platform_interface/src/reactive_ble_platform_interface.dart' as _i3; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -16,15 +18,41 @@ import 'package:reactive_ble_platform_interface/src/reactive_ble_platform_interf // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResult_0 extends _i1.Fake - implements _i2.Result {} +class _FakeResult_0 extends _i1.SmartFake + implements _i2.Result { + _FakeResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWriteCharacteristicInfo_1 extends _i1.Fake - implements _i2.WriteCharacteristicInfo {} +class _FakeWriteCharacteristicInfo_1 extends _i1.SmartFake + implements _i2.WriteCharacteristicInfo { + _FakeWriteCharacteristicInfo_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConnectionPriorityInfo_2 extends _i1.Fake - implements _i2.ConnectionPriorityInfo {} +class _FakeConnectionPriorityInfo_2 extends _i1.SmartFake + implements _i2.ConnectionPriorityInfo { + _FakeConnectionPriorityInfo_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ReactiveBlePlatform]. /// @@ -36,124 +64,239 @@ class MockReactiveBlePlatform extends _i1.Mock } @override - _i4.Stream<_i2.ScanResult> get scanStream => - (super.noSuchMethod(Invocation.getter(#scanStream), - returnValue: Stream<_i2.ScanResult>.empty()) - as _i4.Stream<_i2.ScanResult>); + _i4.Stream<_i2.ScanResult> get scanStream => (super.noSuchMethod( + Invocation.getter(#scanStream), + returnValue: _i4.Stream<_i2.ScanResult>.empty(), + ) as _i4.Stream<_i2.ScanResult>); @override _i4.Stream<_i2.BleStatus> get bleStatusStream => (super.noSuchMethod( - Invocation.getter(#bleStatusStream), - returnValue: Stream<_i2.BleStatus>.empty()) as _i4.Stream<_i2.BleStatus>); + Invocation.getter(#bleStatusStream), + returnValue: _i4.Stream<_i2.BleStatus>.empty(), + ) as _i4.Stream<_i2.BleStatus>); @override _i4.Stream<_i2.ConnectionStateUpdate> get connectionUpdateStream => - (super.noSuchMethod(Invocation.getter(#connectionUpdateStream), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); + (super.noSuchMethod( + Invocation.getter(#connectionUpdateStream), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); @override _i4.Stream<_i2.CharacteristicValue> get charValueUpdateStream => - (super.noSuchMethod(Invocation.getter(#charValueUpdateStream), - returnValue: Stream<_i2.CharacteristicValue>.empty()) - as _i4.Stream<_i2.CharacteristicValue>); - @override - _i4.Future initialize() => - (super.noSuchMethod(Invocation.method(#initialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future deinitialize() => - (super.noSuchMethod(Invocation.method(#deinitialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Stream scanForDevices( - {List<_i2.Uuid>? withServices, - _i2.ScanMode? scanMode, - bool? requireLocationServicesEnabled}) => (super.noSuchMethod( - Invocation.method(#scanForDevices, [], { + Invocation.getter(#charValueUpdateStream), + returnValue: _i4.Stream<_i2.CharacteristicValue>.empty(), + ) as _i4.Stream<_i2.CharacteristicValue>); + @override + _i4.Future initialize() => (super.noSuchMethod( + Invocation.method( + #initialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future deinitialize() => (super.noSuchMethod( + Invocation.method( + #deinitialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Stream scanForDevices({ + required List<_i2.Uuid>? withServices, + required _i2.ScanMode? scanMode, + required bool? requireLocationServicesEnabled, + }) => + (super.noSuchMethod( + Invocation.method( + #scanForDevices, + [], + { #withServices: withServices, #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: Stream.empty()) as _i4.Stream); + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>> clearGattCache(String? deviceId) => (super.noSuchMethod( - Invocation.method(#clearGattCache, [deviceId]), - returnValue: - Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( - _FakeResult_0<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>())) - as _i4.Future< - _i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>); + Invocation.method( + #clearGattCache, + [deviceId], + ), + returnValue: _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( + _FakeResult_0<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>( + this, + Invocation.method( + #clearGattCache, + [deviceId], + ), + )), + ) as _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>); @override _i4.Stream connectToDevice( - String? id, - Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout) => + String? id, + Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + ) => (super.noSuchMethod( - Invocation.method(#connectToDevice, - [id, servicesWithCharacteristicsToDiscover, connectionTimeout]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #connectToDevice, + [ + id, + servicesWithCharacteristicsToDiscover, + connectionTimeout, + ], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override - _i4.Future disconnectDevice(String? deviceId) => - (super.noSuchMethod(Invocation.method(#disconnectDevice, [deviceId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + _i4.Future disconnectDevice(String? deviceId) => (super.noSuchMethod( + Invocation.method( + #disconnectDevice, + [deviceId], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Future> discoverServices(String? deviceId) => - (super.noSuchMethod(Invocation.method(#discoverServices, [deviceId]), - returnValue: Future>.value( - <_i2.DiscoveredService>[])) - as _i4.Future>); + (super.noSuchMethod( + Invocation.method( + #discoverServices, + [deviceId], + ), + returnValue: _i4.Future>.value( + <_i2.DiscoveredService>[]), + ) as _i4.Future>); @override _i4.Stream readCharacteristic( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#readCharacteristic, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #readCharacteristic, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithoutResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithoutResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Stream subscribeToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#subscribeToNotifications, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #subscribeToNotifications, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future stopSubscribingToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#stopSubscribingToNotifications, [characteristic]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.method( + #stopSubscribingToNotifications, + [characteristic], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i4.Future requestMtuSize(String? deviceId, int? mtu) => - (super.noSuchMethod(Invocation.method(#requestMtuSize, [deviceId, mtu]), - returnValue: Future.value(0)) as _i4.Future); + _i4.Future requestMtuSize( + String? deviceId, + int? mtu, + ) => + (super.noSuchMethod( + Invocation.method( + #requestMtuSize, + [ + deviceId, + mtu, + ], + ), + returnValue: _i4.Future.value(0), + ) as _i4.Future); @override _i4.Future<_i2.ConnectionPriorityInfo> requestConnectionPriority( - String? deviceId, _i2.ConnectionPriority? priority) => + String? deviceId, + _i2.ConnectionPriority? priority, + ) => (super.noSuchMethod( - Invocation.method(#requestConnectionPriority, [deviceId, priority]), - returnValue: Future<_i2.ConnectionPriorityInfo>.value( - _FakeConnectionPriorityInfo_2())) as _i4 - .Future<_i2.ConnectionPriorityInfo>); - @override - String toString() => super.toString(); + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + returnValue: _i4.Future<_i2.ConnectionPriorityInfo>.value( + _FakeConnectionPriorityInfo_2( + this, + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + )), + ) as _i4.Future<_i2.ConnectionPriorityInfo>); } diff --git a/packages/flutter_reactive_ble/test/device_connector_test.dart b/packages/flutter_reactive_ble/test/device_connector_test.dart index 5db00646..0d193ef1 100644 --- a/packages/flutter_reactive_ble/test/device_connector_test.dart +++ b/packages/flutter_reactive_ble/test/device_connector_test.dart @@ -99,6 +99,7 @@ void main() { serviceUuids: const [], name: 'test', rssi: -39, + connectable: Connectable.unknown, serviceData: const {}, ); diff --git a/packages/flutter_reactive_ble/test/device_connector_test.mocks.dart b/packages/flutter_reactive_ble/test/device_connector_test.mocks.dart index 8ccb48d8..5b5047e9 100644 --- a/packages/flutter_reactive_ble/test/device_connector_test.mocks.dart +++ b/packages/flutter_reactive_ble/test/device_connector_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in flutter_reactive_ble/test/device_connector_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart' as _i3; @@ -11,6 +12,7 @@ import 'package:flutter_reactive_ble/src/discovered_devices_registry.dart' import 'package:mockito/mockito.dart' as _i1; import 'package:reactive_ble_platform_interface/src/models.dart' as _i2; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -18,17 +20,51 @@ import 'package:reactive_ble_platform_interface/src/models.dart' as _i2; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResult_0 extends _i1.Fake - implements _i2.Result {} +class _FakeResult_0 extends _i1.SmartFake + implements _i2.Result { + _FakeResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWriteCharacteristicInfo_1 extends _i1.Fake - implements _i2.WriteCharacteristicInfo {} +class _FakeWriteCharacteristicInfo_1 extends _i1.SmartFake + implements _i2.WriteCharacteristicInfo { + _FakeWriteCharacteristicInfo_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConnectionPriorityInfo_2 extends _i1.Fake - implements _i2.ConnectionPriorityInfo {} +class _FakeConnectionPriorityInfo_2 extends _i1.SmartFake + implements _i2.ConnectionPriorityInfo { + _FakeConnectionPriorityInfo_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDateTime_3 extends _i1.Fake implements DateTime {} +class _FakeDateTime_3 extends _i1.SmartFake implements DateTime { + _FakeDateTime_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ReactiveBlePlatform]. /// @@ -40,126 +76,241 @@ class MockReactiveBlePlatform extends _i1.Mock } @override - _i4.Stream<_i2.ScanResult> get scanStream => - (super.noSuchMethod(Invocation.getter(#scanStream), - returnValue: Stream<_i2.ScanResult>.empty()) - as _i4.Stream<_i2.ScanResult>); + _i4.Stream<_i2.ScanResult> get scanStream => (super.noSuchMethod( + Invocation.getter(#scanStream), + returnValue: _i4.Stream<_i2.ScanResult>.empty(), + ) as _i4.Stream<_i2.ScanResult>); @override _i4.Stream<_i2.BleStatus> get bleStatusStream => (super.noSuchMethod( - Invocation.getter(#bleStatusStream), - returnValue: Stream<_i2.BleStatus>.empty()) as _i4.Stream<_i2.BleStatus>); + Invocation.getter(#bleStatusStream), + returnValue: _i4.Stream<_i2.BleStatus>.empty(), + ) as _i4.Stream<_i2.BleStatus>); @override _i4.Stream<_i2.ConnectionStateUpdate> get connectionUpdateStream => - (super.noSuchMethod(Invocation.getter(#connectionUpdateStream), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); + (super.noSuchMethod( + Invocation.getter(#connectionUpdateStream), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); @override _i4.Stream<_i2.CharacteristicValue> get charValueUpdateStream => - (super.noSuchMethod(Invocation.getter(#charValueUpdateStream), - returnValue: Stream<_i2.CharacteristicValue>.empty()) - as _i4.Stream<_i2.CharacteristicValue>); - @override - _i4.Future initialize() => - (super.noSuchMethod(Invocation.method(#initialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future deinitialize() => - (super.noSuchMethod(Invocation.method(#deinitialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Stream scanForDevices( - {List<_i2.Uuid>? withServices, - _i2.ScanMode? scanMode, - bool? requireLocationServicesEnabled}) => (super.noSuchMethod( - Invocation.method(#scanForDevices, [], { + Invocation.getter(#charValueUpdateStream), + returnValue: _i4.Stream<_i2.CharacteristicValue>.empty(), + ) as _i4.Stream<_i2.CharacteristicValue>); + @override + _i4.Future initialize() => (super.noSuchMethod( + Invocation.method( + #initialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future deinitialize() => (super.noSuchMethod( + Invocation.method( + #deinitialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Stream scanForDevices({ + required List<_i2.Uuid>? withServices, + required _i2.ScanMode? scanMode, + required bool? requireLocationServicesEnabled, + }) => + (super.noSuchMethod( + Invocation.method( + #scanForDevices, + [], + { #withServices: withServices, #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: Stream.empty()) as _i4.Stream); + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>> clearGattCache(String? deviceId) => (super.noSuchMethod( - Invocation.method(#clearGattCache, [deviceId]), - returnValue: - Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( - _FakeResult_0<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>())) - as _i4.Future< - _i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>); + Invocation.method( + #clearGattCache, + [deviceId], + ), + returnValue: _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( + _FakeResult_0<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>( + this, + Invocation.method( + #clearGattCache, + [deviceId], + ), + )), + ) as _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>); @override _i4.Stream connectToDevice( - String? id, - Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout) => + String? id, + Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + ) => (super.noSuchMethod( - Invocation.method(#connectToDevice, - [id, servicesWithCharacteristicsToDiscover, connectionTimeout]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #connectToDevice, + [ + id, + servicesWithCharacteristicsToDiscover, + connectionTimeout, + ], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override - _i4.Future disconnectDevice(String? deviceId) => - (super.noSuchMethod(Invocation.method(#disconnectDevice, [deviceId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + _i4.Future disconnectDevice(String? deviceId) => (super.noSuchMethod( + Invocation.method( + #disconnectDevice, + [deviceId], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Future> discoverServices(String? deviceId) => - (super.noSuchMethod(Invocation.method(#discoverServices, [deviceId]), - returnValue: Future>.value( - <_i2.DiscoveredService>[])) - as _i4.Future>); + (super.noSuchMethod( + Invocation.method( + #discoverServices, + [deviceId], + ), + returnValue: _i4.Future>.value( + <_i2.DiscoveredService>[]), + ) as _i4.Future>); @override _i4.Stream readCharacteristic( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#readCharacteristic, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #readCharacteristic, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithoutResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithoutResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Stream subscribeToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#subscribeToNotifications, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #subscribeToNotifications, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future stopSubscribingToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#stopSubscribingToNotifications, [characteristic]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.method( + #stopSubscribingToNotifications, + [characteristic], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i4.Future requestMtuSize(String? deviceId, int? mtu) => - (super.noSuchMethod(Invocation.method(#requestMtuSize, [deviceId, mtu]), - returnValue: Future.value(0)) as _i4.Future); + _i4.Future requestMtuSize( + String? deviceId, + int? mtu, + ) => + (super.noSuchMethod( + Invocation.method( + #requestMtuSize, + [ + deviceId, + mtu, + ], + ), + returnValue: _i4.Future.value(0), + ) as _i4.Future); @override _i4.Future<_i2.ConnectionPriorityInfo> requestConnectionPriority( - String? deviceId, _i2.ConnectionPriority? priority) => + String? deviceId, + _i2.ConnectionPriority? priority, + ) => (super.noSuchMethod( - Invocation.method(#requestConnectionPriority, [deviceId, priority]), - returnValue: Future<_i2.ConnectionPriorityInfo>.value( - _FakeConnectionPriorityInfo_2())) as _i4 - .Future<_i2.ConnectionPriorityInfo>); - @override - String toString() => super.toString(); + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + returnValue: _i4.Future<_i2.ConnectionPriorityInfo>.value( + _FakeConnectionPriorityInfo_2( + this, + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + )), + ) as _i4.Future<_i2.ConnectionPriorityInfo>); } /// A class which mocks [DeviceScanner]. @@ -171,20 +322,23 @@ class MockDeviceScanner extends _i1.Mock implements _i5.DeviceScanner { } @override - _i4.Stream<_i2.DiscoveredDevice> scanForDevices( - {List<_i2.Uuid>? withServices, - _i2.ScanMode? scanMode = _i2.ScanMode.balanced, - bool? requireLocationServicesEnabled = true}) => + _i4.Stream<_i2.DiscoveredDevice> scanForDevices({ + required List<_i2.Uuid>? withServices, + _i2.ScanMode? scanMode = _i2.ScanMode.balanced, + bool? requireLocationServicesEnabled = true, + }) => (super.noSuchMethod( - Invocation.method(#scanForDevices, [], { - #withServices: withServices, - #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: Stream<_i2.DiscoveredDevice>.empty()) - as _i4.Stream<_i2.DiscoveredDevice>); - @override - String toString() => super.toString(); + Invocation.method( + #scanForDevices, + [], + { + #withServices: withServices, + #scanMode: scanMode, + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _i4.Stream<_i2.DiscoveredDevice>.empty(), + ) as _i4.Stream<_i2.DiscoveredDevice>); } /// A class which mocks [DiscoveredDevicesRegistry]. @@ -197,28 +351,51 @@ class MockDiscoveredDevicesRegistry extends _i1.Mock } @override - DateTime Function() get getTimestamp => - (super.noSuchMethod(Invocation.getter(#getTimestamp), - returnValue: () => _FakeDateTime_3()) as DateTime Function()); + DateTime Function() get getTimestamp => (super.noSuchMethod( + Invocation.getter(#getTimestamp), + returnValue: () => _FakeDateTime_3( + this, + Invocation.getter(#getTimestamp), + ), + ) as DateTime Function()); @override - void add(String? deviceId) => - super.noSuchMethod(Invocation.method(#add, [deviceId]), - returnValueForMissingStub: null); + void add(String? deviceId) => super.noSuchMethod( + Invocation.method( + #add, + [deviceId], + ), + returnValueForMissingStub: null, + ); @override - void remove(String? deviceId) => - super.noSuchMethod(Invocation.method(#remove, [deviceId]), - returnValueForMissingStub: null); + void remove(String? deviceId) => super.noSuchMethod( + Invocation.method( + #remove, + [deviceId], + ), + returnValueForMissingStub: null, + ); @override - bool isEmpty() => - (super.noSuchMethod(Invocation.method(#isEmpty, []), returnValue: false) - as bool); + bool isEmpty() => (super.noSuchMethod( + Invocation.method( + #isEmpty, + [], + ), + returnValue: false, + ) as bool); @override - bool deviceIsDiscoveredRecently( - {String? deviceId, Duration? cacheValidity}) => + bool deviceIsDiscoveredRecently({ + required String? deviceId, + required Duration? cacheValidity, + }) => (super.noSuchMethod( - Invocation.method(#deviceIsDiscoveredRecently, [], - {#deviceId: deviceId, #cacheValidity: cacheValidity}), - returnValue: false) as bool); - @override - String toString() => super.toString(); + Invocation.method( + #deviceIsDiscoveredRecently, + [], + { + #deviceId: deviceId, + #cacheValidity: cacheValidity, + }, + ), + returnValue: false, + ) as bool); } diff --git a/packages/flutter_reactive_ble/test/device_scanner_test.dart b/packages/flutter_reactive_ble/test/device_scanner_test.dart index 8f95f86d..884f6e7b 100644 --- a/packages/flutter_reactive_ble/test/device_scanner_test.dart +++ b/packages/flutter_reactive_ble/test/device_scanner_test.dart @@ -28,6 +28,7 @@ void main() { serviceData: const {}, manufacturerData: Uint8List.fromList([1]), rssi: -40, + connectable: Connectable.unknown, ); _device2 = DiscoveredDevice( id: '456', @@ -36,6 +37,7 @@ void main() { serviceData: const {}, manufacturerData: Uint8List.fromList([0]), rssi: -80, + connectable: Connectable.unknown, ); _delayAfterScanCompletion = Completer(); diff --git a/packages/flutter_reactive_ble/test/device_scanner_test.mocks.dart b/packages/flutter_reactive_ble/test/device_scanner_test.mocks.dart index cb487897..fd20c095 100644 --- a/packages/flutter_reactive_ble/test/device_scanner_test.mocks.dart +++ b/packages/flutter_reactive_ble/test/device_scanner_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in flutter_reactive_ble/test/device_scanner_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'package:mockito/mockito.dart' as _i1; @@ -9,6 +10,7 @@ import 'package:reactive_ble_platform_interface/src/models.dart' as _i2; import 'package:reactive_ble_platform_interface/src/reactive_ble_platform_interface.dart' as _i3; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -16,15 +18,41 @@ import 'package:reactive_ble_platform_interface/src/reactive_ble_platform_interf // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResult_0 extends _i1.Fake - implements _i2.Result {} +class _FakeResult_0 extends _i1.SmartFake + implements _i2.Result { + _FakeResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWriteCharacteristicInfo_1 extends _i1.Fake - implements _i2.WriteCharacteristicInfo {} +class _FakeWriteCharacteristicInfo_1 extends _i1.SmartFake + implements _i2.WriteCharacteristicInfo { + _FakeWriteCharacteristicInfo_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConnectionPriorityInfo_2 extends _i1.Fake - implements _i2.ConnectionPriorityInfo {} +class _FakeConnectionPriorityInfo_2 extends _i1.SmartFake + implements _i2.ConnectionPriorityInfo { + _FakeConnectionPriorityInfo_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ReactiveBlePlatform]. /// @@ -36,124 +64,239 @@ class MockReactiveBlePlatform extends _i1.Mock } @override - _i4.Stream<_i2.ScanResult> get scanStream => - (super.noSuchMethod(Invocation.getter(#scanStream), - returnValue: Stream<_i2.ScanResult>.empty()) - as _i4.Stream<_i2.ScanResult>); + _i4.Stream<_i2.ScanResult> get scanStream => (super.noSuchMethod( + Invocation.getter(#scanStream), + returnValue: _i4.Stream<_i2.ScanResult>.empty(), + ) as _i4.Stream<_i2.ScanResult>); @override _i4.Stream<_i2.BleStatus> get bleStatusStream => (super.noSuchMethod( - Invocation.getter(#bleStatusStream), - returnValue: Stream<_i2.BleStatus>.empty()) as _i4.Stream<_i2.BleStatus>); + Invocation.getter(#bleStatusStream), + returnValue: _i4.Stream<_i2.BleStatus>.empty(), + ) as _i4.Stream<_i2.BleStatus>); @override _i4.Stream<_i2.ConnectionStateUpdate> get connectionUpdateStream => - (super.noSuchMethod(Invocation.getter(#connectionUpdateStream), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); + (super.noSuchMethod( + Invocation.getter(#connectionUpdateStream), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); @override _i4.Stream<_i2.CharacteristicValue> get charValueUpdateStream => - (super.noSuchMethod(Invocation.getter(#charValueUpdateStream), - returnValue: Stream<_i2.CharacteristicValue>.empty()) - as _i4.Stream<_i2.CharacteristicValue>); - @override - _i4.Future initialize() => - (super.noSuchMethod(Invocation.method(#initialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future deinitialize() => - (super.noSuchMethod(Invocation.method(#deinitialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Stream scanForDevices( - {List<_i2.Uuid>? withServices, - _i2.ScanMode? scanMode, - bool? requireLocationServicesEnabled}) => (super.noSuchMethod( - Invocation.method(#scanForDevices, [], { + Invocation.getter(#charValueUpdateStream), + returnValue: _i4.Stream<_i2.CharacteristicValue>.empty(), + ) as _i4.Stream<_i2.CharacteristicValue>); + @override + _i4.Future initialize() => (super.noSuchMethod( + Invocation.method( + #initialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future deinitialize() => (super.noSuchMethod( + Invocation.method( + #deinitialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Stream scanForDevices({ + required List<_i2.Uuid>? withServices, + required _i2.ScanMode? scanMode, + required bool? requireLocationServicesEnabled, + }) => + (super.noSuchMethod( + Invocation.method( + #scanForDevices, + [], + { #withServices: withServices, #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: Stream.empty()) as _i4.Stream); + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>> clearGattCache(String? deviceId) => (super.noSuchMethod( - Invocation.method(#clearGattCache, [deviceId]), - returnValue: - Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( - _FakeResult_0<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>())) - as _i4.Future< - _i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>); + Invocation.method( + #clearGattCache, + [deviceId], + ), + returnValue: _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( + _FakeResult_0<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>( + this, + Invocation.method( + #clearGattCache, + [deviceId], + ), + )), + ) as _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>); @override _i4.Stream connectToDevice( - String? id, - Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout) => + String? id, + Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + ) => (super.noSuchMethod( - Invocation.method(#connectToDevice, - [id, servicesWithCharacteristicsToDiscover, connectionTimeout]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #connectToDevice, + [ + id, + servicesWithCharacteristicsToDiscover, + connectionTimeout, + ], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override - _i4.Future disconnectDevice(String? deviceId) => - (super.noSuchMethod(Invocation.method(#disconnectDevice, [deviceId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + _i4.Future disconnectDevice(String? deviceId) => (super.noSuchMethod( + Invocation.method( + #disconnectDevice, + [deviceId], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Future> discoverServices(String? deviceId) => - (super.noSuchMethod(Invocation.method(#discoverServices, [deviceId]), - returnValue: Future>.value( - <_i2.DiscoveredService>[])) - as _i4.Future>); + (super.noSuchMethod( + Invocation.method( + #discoverServices, + [deviceId], + ), + returnValue: _i4.Future>.value( + <_i2.DiscoveredService>[]), + ) as _i4.Future>); @override _i4.Stream readCharacteristic( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#readCharacteristic, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #readCharacteristic, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithoutResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithoutResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Stream subscribeToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#subscribeToNotifications, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #subscribeToNotifications, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future stopSubscribingToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#stopSubscribingToNotifications, [characteristic]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.method( + #stopSubscribingToNotifications, + [characteristic], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i4.Future requestMtuSize(String? deviceId, int? mtu) => - (super.noSuchMethod(Invocation.method(#requestMtuSize, [deviceId, mtu]), - returnValue: Future.value(0)) as _i4.Future); + _i4.Future requestMtuSize( + String? deviceId, + int? mtu, + ) => + (super.noSuchMethod( + Invocation.method( + #requestMtuSize, + [ + deviceId, + mtu, + ], + ), + returnValue: _i4.Future.value(0), + ) as _i4.Future); @override _i4.Future<_i2.ConnectionPriorityInfo> requestConnectionPriority( - String? deviceId, _i2.ConnectionPriority? priority) => + String? deviceId, + _i2.ConnectionPriority? priority, + ) => (super.noSuchMethod( - Invocation.method(#requestConnectionPriority, [deviceId, priority]), - returnValue: Future<_i2.ConnectionPriorityInfo>.value( - _FakeConnectionPriorityInfo_2())) as _i4 - .Future<_i2.ConnectionPriorityInfo>); - @override - String toString() => super.toString(); + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + returnValue: _i4.Future<_i2.ConnectionPriorityInfo>.value( + _FakeConnectionPriorityInfo_2( + this, + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + )), + ) as _i4.Future<_i2.ConnectionPriorityInfo>); } diff --git a/packages/flutter_reactive_ble/test/reactive_ble_test.dart b/packages/flutter_reactive_ble/test/reactive_ble_test.dart index 8aba69c3..a791a118 100644 --- a/packages/flutter_reactive_ble/test/reactive_ble_test.dart +++ b/packages/flutter_reactive_ble/test/reactive_ble_test.dart @@ -236,6 +236,7 @@ void main() { manufacturerData: Uint8List.fromList([0]), name: 'test', rssi: -39, + connectable: Connectable.unknown, serviceData: const {}, serviceUuids: const [], ); diff --git a/packages/flutter_reactive_ble/test/reactive_ble_test.mocks.dart b/packages/flutter_reactive_ble/test/reactive_ble_test.mocks.dart index 5701f7f7..a5c05e36 100644 --- a/packages/flutter_reactive_ble/test/reactive_ble_test.mocks.dart +++ b/packages/flutter_reactive_ble/test/reactive_ble_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in flutter_reactive_ble/test/reactive_ble_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart' as _i3; @@ -12,6 +13,7 @@ import 'package:flutter_reactive_ble/src/device_scanner.dart' as _i7; import 'package:mockito/mockito.dart' as _i1; import 'package:reactive_ble_platform_interface/src/models.dart' as _i2; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -19,15 +21,41 @@ import 'package:reactive_ble_platform_interface/src/models.dart' as _i2; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResult_0 extends _i1.Fake - implements _i2.Result {} +class _FakeResult_0 extends _i1.SmartFake + implements _i2.Result { + _FakeResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWriteCharacteristicInfo_1 extends _i1.Fake - implements _i2.WriteCharacteristicInfo {} +class _FakeWriteCharacteristicInfo_1 extends _i1.SmartFake + implements _i2.WriteCharacteristicInfo { + _FakeWriteCharacteristicInfo_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConnectionPriorityInfo_2 extends _i1.Fake - implements _i2.ConnectionPriorityInfo {} +class _FakeConnectionPriorityInfo_2 extends _i1.SmartFake + implements _i2.ConnectionPriorityInfo { + _FakeConnectionPriorityInfo_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ReactiveBlePlatform]. /// @@ -39,126 +67,241 @@ class MockReactiveBlePlatform extends _i1.Mock } @override - _i4.Stream<_i2.ScanResult> get scanStream => - (super.noSuchMethod(Invocation.getter(#scanStream), - returnValue: Stream<_i2.ScanResult>.empty()) - as _i4.Stream<_i2.ScanResult>); + _i4.Stream<_i2.ScanResult> get scanStream => (super.noSuchMethod( + Invocation.getter(#scanStream), + returnValue: _i4.Stream<_i2.ScanResult>.empty(), + ) as _i4.Stream<_i2.ScanResult>); @override _i4.Stream<_i2.BleStatus> get bleStatusStream => (super.noSuchMethod( - Invocation.getter(#bleStatusStream), - returnValue: Stream<_i2.BleStatus>.empty()) as _i4.Stream<_i2.BleStatus>); + Invocation.getter(#bleStatusStream), + returnValue: _i4.Stream<_i2.BleStatus>.empty(), + ) as _i4.Stream<_i2.BleStatus>); @override _i4.Stream<_i2.ConnectionStateUpdate> get connectionUpdateStream => - (super.noSuchMethod(Invocation.getter(#connectionUpdateStream), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); + (super.noSuchMethod( + Invocation.getter(#connectionUpdateStream), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); @override _i4.Stream<_i2.CharacteristicValue> get charValueUpdateStream => - (super.noSuchMethod(Invocation.getter(#charValueUpdateStream), - returnValue: Stream<_i2.CharacteristicValue>.empty()) - as _i4.Stream<_i2.CharacteristicValue>); - @override - _i4.Future initialize() => - (super.noSuchMethod(Invocation.method(#initialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future deinitialize() => - (super.noSuchMethod(Invocation.method(#deinitialize, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Stream scanForDevices( - {List<_i2.Uuid>? withServices, - _i2.ScanMode? scanMode, - bool? requireLocationServicesEnabled}) => (super.noSuchMethod( - Invocation.method(#scanForDevices, [], { + Invocation.getter(#charValueUpdateStream), + returnValue: _i4.Stream<_i2.CharacteristicValue>.empty(), + ) as _i4.Stream<_i2.CharacteristicValue>); + @override + _i4.Future initialize() => (super.noSuchMethod( + Invocation.method( + #initialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future deinitialize() => (super.noSuchMethod( + Invocation.method( + #deinitialize, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Stream scanForDevices({ + required List<_i2.Uuid>? withServices, + required _i2.ScanMode? scanMode, + required bool? requireLocationServicesEnabled, + }) => + (super.noSuchMethod( + Invocation.method( + #scanForDevices, + [], + { #withServices: withServices, #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: Stream.empty()) as _i4.Stream); + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>> clearGattCache(String? deviceId) => (super.noSuchMethod( - Invocation.method(#clearGattCache, [deviceId]), - returnValue: - Future<_i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( - _FakeResult_0<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>())) - as _i4.Future< - _i2.Result<_i2.Unit, _i2.GenericFailure<_i2.ClearGattCacheError>?>>); + Invocation.method( + #clearGattCache, + [deviceId], + ), + returnValue: _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>.value( + _FakeResult_0<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>( + this, + Invocation.method( + #clearGattCache, + [deviceId], + ), + )), + ) as _i4.Future< + _i2.Result<_i2.Unit, + _i2.GenericFailure<_i2.ClearGattCacheError>?>>); @override _i4.Stream connectToDevice( - String? id, - Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout) => + String? id, + Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + ) => (super.noSuchMethod( - Invocation.method(#connectToDevice, - [id, servicesWithCharacteristicsToDiscover, connectionTimeout]), - returnValue: Stream.empty()) as _i4.Stream); - @override - _i4.Future disconnectDevice(String? deviceId) => - (super.noSuchMethod(Invocation.method(#disconnectDevice, [deviceId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.method( + #connectToDevice, + [ + id, + servicesWithCharacteristicsToDiscover, + connectionTimeout, + ], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); + @override + _i4.Future disconnectDevice(String? deviceId) => (super.noSuchMethod( + Invocation.method( + #disconnectDevice, + [deviceId], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Future> discoverServices(String? deviceId) => - (super.noSuchMethod(Invocation.method(#discoverServices, [deviceId]), - returnValue: Future>.value( - <_i2.DiscoveredService>[])) - as _i4.Future>); + (super.noSuchMethod( + Invocation.method( + #discoverServices, + [deviceId], + ), + returnValue: _i4.Future>.value( + <_i2.DiscoveredService>[]), + ) as _i4.Future>); @override _i4.Stream readCharacteristic( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#readCharacteristic, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #readCharacteristic, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Future<_i2.WriteCharacteristicInfo> writeCharacteristicWithoutResponse( - _i2.QualifiedCharacteristic? characteristic, List? value) => + _i2.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #writeCharacteristicWithoutResponse, [characteristic, value]), - returnValue: Future<_i2.WriteCharacteristicInfo>.value( - _FakeWriteCharacteristicInfo_1())) - as _i4.Future<_i2.WriteCharacteristicInfo>); + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + returnValue: _i4.Future<_i2.WriteCharacteristicInfo>.value( + _FakeWriteCharacteristicInfo_1( + this, + Invocation.method( + #writeCharacteristicWithoutResponse, + [ + characteristic, + value, + ], + ), + )), + ) as _i4.Future<_i2.WriteCharacteristicInfo>); @override _i4.Stream subscribeToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#subscribeToNotifications, [characteristic]), - returnValue: Stream.empty()) as _i4.Stream); + Invocation.method( + #subscribeToNotifications, + [characteristic], + ), + returnValue: _i4.Stream.empty(), + ) as _i4.Stream); @override _i4.Future stopSubscribingToNotifications( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#stopSubscribingToNotifications, [characteristic]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future requestMtuSize(String? deviceId, int? mtu) => - (super.noSuchMethod(Invocation.method(#requestMtuSize, [deviceId, mtu]), - returnValue: Future.value(0)) as _i4.Future); + Invocation.method( + #stopSubscribingToNotifications, + [characteristic], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future requestMtuSize( + String? deviceId, + int? mtu, + ) => + (super.noSuchMethod( + Invocation.method( + #requestMtuSize, + [ + deviceId, + mtu, + ], + ), + returnValue: _i4.Future.value(0), + ) as _i4.Future); @override _i4.Future<_i2.ConnectionPriorityInfo> requestConnectionPriority( - String? deviceId, _i2.ConnectionPriority? priority) => + String? deviceId, + _i2.ConnectionPriority? priority, + ) => (super.noSuchMethod( - Invocation.method(#requestConnectionPriority, [deviceId, priority]), - returnValue: Future<_i2.ConnectionPriorityInfo>.value( - _FakeConnectionPriorityInfo_2())) as _i4 - .Future<_i2.ConnectionPriorityInfo>); - @override - String toString() => super.toString(); + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + returnValue: _i4.Future<_i2.ConnectionPriorityInfo>.value( + _FakeConnectionPriorityInfo_2( + this, + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + )), + ) as _i4.Future<_i2.ConnectionPriorityInfo>); } /// A class which mocks [Logger]. @@ -170,18 +313,26 @@ class MockLogger extends _i1.Mock implements _i3.Logger { } @override - set logLevel(_i2.LogLevel? logLevel) => - super.noSuchMethod(Invocation.setter(#logLevel, logLevel), - returnValueForMissingStub: null); - @override - _i2.LogLevel get logLevel => (super.noSuchMethod(Invocation.getter(#logLevel), - returnValue: _i2.LogLevel.none) as _i2.LogLevel); - @override - void log(Object? message) => - super.noSuchMethod(Invocation.method(#log, [message]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + set logLevel(_i2.LogLevel? logLevel) => super.noSuchMethod( + Invocation.setter( + #logLevel, + logLevel, + ), + returnValueForMissingStub: null, + ); + @override + _i2.LogLevel get logLevel => (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i2.LogLevel.none, + ) as _i2.LogLevel); + @override + void log(Object? message) => super.noSuchMethod( + Invocation.method( + #log, + [message], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [ConnectedDeviceOperation]. @@ -195,61 +346,104 @@ class MockConnectedDeviceOperation extends _i1.Mock @override _i4.Stream<_i2.CharacteristicValue> get characteristicValueStream => - (super.noSuchMethod(Invocation.getter(#characteristicValueStream), - returnValue: Stream<_i2.CharacteristicValue>.empty()) - as _i4.Stream<_i2.CharacteristicValue>); + (super.noSuchMethod( + Invocation.getter(#characteristicValueStream), + returnValue: _i4.Stream<_i2.CharacteristicValue>.empty(), + ) as _i4.Stream<_i2.CharacteristicValue>); @override _i4.Future> readCharacteristic( _i2.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#readCharacteristic, [characteristic]), - returnValue: Future>.value([])) - as _i4.Future>); + Invocation.method( + #readCharacteristic, + [characteristic], + ), + returnValue: _i4.Future>.value([]), + ) as _i4.Future>); @override _i4.Future writeCharacteristicWithResponse( - _i2.QualifiedCharacteristic? characteristic, - {List? value}) => + _i2.QualifiedCharacteristic? characteristic, { + required List? value, + }) => (super.noSuchMethod( - Invocation.method(#writeCharacteristicWithResponse, [characteristic], - {#value: value}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.method( + #writeCharacteristicWithResponse, + [characteristic], + {#value: value}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Future writeCharacteristicWithoutResponse( - _i2.QualifiedCharacteristic? characteristic, - {List? value}) => + _i2.QualifiedCharacteristic? characteristic, { + required List? value, + }) => (super.noSuchMethod( - Invocation.method(#writeCharacteristicWithoutResponse, - [characteristic], {#value: value}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.method( + #writeCharacteristicWithoutResponse, + [characteristic], + {#value: value}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Stream> subscribeToCharacteristic( - _i2.QualifiedCharacteristic? characteristic, - _i4.Future? isDisconnected) => + _i2.QualifiedCharacteristic? characteristic, + _i4.Future? isDisconnected, + ) => (super.noSuchMethod( - Invocation.method( - #subscribeToCharacteristic, [characteristic, isDisconnected]), - returnValue: Stream>.empty()) as _i4.Stream>); - @override - _i4.Future requestMtu(String? deviceId, int? mtu) => - (super.noSuchMethod(Invocation.method(#requestMtu, [deviceId, mtu]), - returnValue: Future.value(0)) as _i4.Future); + Invocation.method( + #subscribeToCharacteristic, + [ + characteristic, + isDisconnected, + ], + ), + returnValue: _i4.Stream>.empty(), + ) as _i4.Stream>); + @override + _i4.Future requestMtu( + String? deviceId, + int? mtu, + ) => + (super.noSuchMethod( + Invocation.method( + #requestMtu, + [ + deviceId, + mtu, + ], + ), + returnValue: _i4.Future.value(0), + ) as _i4.Future); @override _i4.Future> discoverServices(String? deviceId) => - (super.noSuchMethod(Invocation.method(#discoverServices, [deviceId]), - returnValue: Future>.value( - <_i2.DiscoveredService>[])) - as _i4.Future>); + (super.noSuchMethod( + Invocation.method( + #discoverServices, + [deviceId], + ), + returnValue: _i4.Future>.value( + <_i2.DiscoveredService>[]), + ) as _i4.Future>); @override _i4.Future requestConnectionPriority( - String? deviceId, _i2.ConnectionPriority? priority) => + String? deviceId, + _i2.ConnectionPriority? priority, + ) => (super.noSuchMethod( - Invocation.method(#requestConnectionPriority, [deviceId, priority]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - String toString() => super.toString(); + Invocation.method( + #requestConnectionPriority, + [ + deviceId, + priority, + ], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } /// A class which mocks [DeviceConnector]. @@ -262,43 +456,52 @@ class MockDeviceConnector extends _i1.Mock implements _i6.DeviceConnector { @override _i4.Stream<_i2.ConnectionStateUpdate> get deviceConnectionStateUpdateStream => - (super.noSuchMethod(Invocation.getter(#deviceConnectionStateUpdateStream), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); - @override - _i4.Stream<_i2.ConnectionStateUpdate> connect( - {String? id, - Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout}) => (super.noSuchMethod( - Invocation.method(#connect, [], { - #id: id, - #servicesWithCharacteristicsToDiscover: - servicesWithCharacteristicsToDiscover, - #connectionTimeout: connectionTimeout - }), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); - @override - _i4.Stream<_i2.ConnectionStateUpdate> connectToAdvertisingDevice( - {String? id, - List<_i2.Uuid>? withServices, - Duration? prescanDuration, - Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout}) => + Invocation.getter(#deviceConnectionStateUpdateStream), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); + @override + _i4.Stream<_i2.ConnectionStateUpdate> connect({ + required String? id, + Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + }) => + (super.noSuchMethod( + Invocation.method( + #connect, + [], + { + #id: id, + #servicesWithCharacteristicsToDiscover: + servicesWithCharacteristicsToDiscover, + #connectionTimeout: connectionTimeout, + }, + ), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); + @override + _i4.Stream<_i2.ConnectionStateUpdate> connectToAdvertisingDevice({ + required String? id, + required List<_i2.Uuid>? withServices, + required Duration? prescanDuration, + Map<_i2.Uuid, List<_i2.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + }) => (super.noSuchMethod( - Invocation.method(#connectToAdvertisingDevice, [], { - #id: id, - #withServices: withServices, - #prescanDuration: prescanDuration, - #servicesWithCharacteristicsToDiscover: - servicesWithCharacteristicsToDiscover, - #connectionTimeout: connectionTimeout - }), - returnValue: Stream<_i2.ConnectionStateUpdate>.empty()) - as _i4.Stream<_i2.ConnectionStateUpdate>); - @override - String toString() => super.toString(); + Invocation.method( + #connectToAdvertisingDevice, + [], + { + #id: id, + #withServices: withServices, + #prescanDuration: prescanDuration, + #servicesWithCharacteristicsToDiscover: + servicesWithCharacteristicsToDiscover, + #connectionTimeout: connectionTimeout, + }, + ), + returnValue: _i4.Stream<_i2.ConnectionStateUpdate>.empty(), + ) as _i4.Stream<_i2.ConnectionStateUpdate>); } /// A class which mocks [DeviceScanner]. @@ -310,18 +513,21 @@ class MockDeviceScanner extends _i1.Mock implements _i7.DeviceScanner { } @override - _i4.Stream<_i2.DiscoveredDevice> scanForDevices( - {List<_i2.Uuid>? withServices, - _i2.ScanMode? scanMode = _i2.ScanMode.balanced, - bool? requireLocationServicesEnabled = true}) => + _i4.Stream<_i2.DiscoveredDevice> scanForDevices({ + required List<_i2.Uuid>? withServices, + _i2.ScanMode? scanMode = _i2.ScanMode.balanced, + bool? requireLocationServicesEnabled = true, + }) => (super.noSuchMethod( - Invocation.method(#scanForDevices, [], { - #withServices: withServices, - #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: Stream<_i2.DiscoveredDevice>.empty()) - as _i4.Stream<_i2.DiscoveredDevice>); - @override - String toString() => super.toString(); + Invocation.method( + #scanForDevices, + [], + { + #withServices: withServices, + #scanMode: scanMode, + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _i4.Stream<_i2.DiscoveredDevice>.empty(), + ) as _i4.Stream<_i2.DiscoveredDevice>); } diff --git a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/BleWrapper.kt b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/BleWrapper.kt index 93dd2b42..08737a09 100644 --- a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/BleWrapper.kt +++ b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/BleWrapper.kt @@ -3,7 +3,7 @@ package com.signify.hue.flutterreactiveble.ble import com.polidea.rxandroidble2.RxBleConnection import java.util.UUID -data class ScanInfo(val deviceId: String, val name: String, val rssi: Int, val serviceData: Map, val serviceUuids: List, val manufacturerData: ByteArray) { +data class ScanInfo(val deviceId: String, val name: String, val rssi: Int, val connectable: Connectable, val serviceData: Map, val serviceUuids: List, val manufacturerData: ByteArray) { override fun equals(other: Any?): Boolean { if (this === other) return true if (javaClass != other?.javaClass) return false @@ -13,6 +13,7 @@ data class ScanInfo(val deviceId: String, val name: String, val rssi: Int, val s if (deviceId != other.deviceId) return false if (name != other.name) return false if (rssi != other.rssi) return false + if (connectable != other.connectable) return false if (serviceData != other.serviceData) return false if (serviceUuids != other.serviceUuids) return false if (!manufacturerData.contentEquals(other.manufacturerData)) return false @@ -24,6 +25,7 @@ data class ScanInfo(val deviceId: String, val name: String, val rssi: Int, val s var result = deviceId.hashCode() result = 31 * result + name.hashCode() result = 31 * result + rssi + result = 31 * result + connectable.hashCode() result = 31 * result + serviceData.hashCode() result = 31 * result + serviceUuids.hashCode() result = 31 * result + manufacturerData.contentHashCode() @@ -65,3 +67,9 @@ enum class ConnectionPriority(val code: Int) { HIGH_PERFORMACE(code = 1), LOW_POWER(code = 2) } + +enum class Connectable(val code: Int) { + UNKNOWN(code = 0), + NOT_CONNECTABLE(code = 1), + CONNECTABLE(code = 2) +} diff --git a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt index 5cdea0df..4c10e9ef 100644 --- a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt +++ b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt @@ -13,6 +13,7 @@ import com.polidea.rxandroidble2.RxBleClient import com.polidea.rxandroidble2.RxBleConnection import com.polidea.rxandroidble2.RxBleDevice import com.polidea.rxandroidble2.RxBleDeviceServices +import com.polidea.rxandroidble2.scan.IsConnectable import com.polidea.rxandroidble2.scan.ScanFilter import com.polidea.rxandroidble2.scan.ScanSettings import com.signify.hue.flutterreactiveble.ble.extensions.writeCharWithResponse @@ -85,6 +86,11 @@ open class ReactiveBleClient(private val context: Context) : BleClient { ScanInfo(result.bleDevice.macAddress, result.scanRecord.deviceName ?: result.bleDevice.name ?: "", result.rssi, + when (result.isConnectable) { + IsConnectable.LEGACY_UNKNOWN -> Connectable.UNKNOWN + IsConnectable.NOT_CONNECTABLE -> Connectable.NOT_CONNECTABLE + IsConnectable.CONNECTABLE -> Connectable.CONNECTABLE + }, result.scanRecord.serviceData?.mapKeys { it.key.uuid } ?: emptyMap(), result.scanRecord.serviceUuids?.map { it.uuid } ?: emptyList(), extractManufacturerData(result.scanRecord.manufacturerSpecificData)) diff --git a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverter.kt b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverter.kt index 01accad0..de654976 100644 --- a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverter.kt +++ b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverter.kt @@ -36,6 +36,9 @@ class ProtobufMessageConverter { .setId(scanInfo.deviceId) .setName(scanInfo.name) .setRssi(scanInfo.rssi) + .setIsConnectable(pb.IsConnectable.newBuilder() + .setCode(scanInfo.connectable.code) + .build()) .addAllServiceData(createServiceDataEntry(scanInfo.serviceData)) .addAllServiceUuids(createServiceUuids(scanInfo.serviceUuids)) .setManufacturerData(ByteString.copyFrom(scanInfo.manufacturerData)) diff --git a/packages/reactive_ble_mobile/android/src/test/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverterTest.kt b/packages/reactive_ble_mobile/android/src/test/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverterTest.kt index 51b3eeca..6b5f3246 100644 --- a/packages/reactive_ble_mobile/android/src/test/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverterTest.kt +++ b/packages/reactive_ble_mobile/android/src/test/kotlin/com/signify/hue/flutterreactiveble/converters/ProtobufMessageConverterTest.kt @@ -2,6 +2,7 @@ package com.signify.hue.flutterreactiveble.converters import com.google.common.truth.Truth.assertThat import com.google.protobuf.ByteString +import com.signify.hue.flutterreactiveble.ble.Connectable import com.signify.hue.flutterreactiveble.ble.ConnectionUpdateSuccess import com.signify.hue.flutterreactiveble.ble.MtuNegotiateFailed import com.signify.hue.flutterreactiveble.ble.MtuNegotiateSuccesful @@ -55,6 +56,14 @@ class ProtobufMessageConverterTest { assertThat(result.rssi).isEqualTo(scanInfo.rssi) } + @Test + fun `converts connectable into message connectable`() { + val scanInfo = createScanInfo() + val result = protobufConverter.convertScanInfo(scanInfo) + + assertThat(result.isConnectable.code).isEqualTo(scanInfo.connectable.code) + } + @Test fun `converts servicedataentry into message structure`() { val scanInfo = createScanInfo() @@ -195,8 +204,12 @@ class ProtobufMessageConverterTest { val manufacturerData = "123".toByteArray() return ScanInfo( - deviceId = macAdress, name = deviceName, - rssi = rssi, serviceData = serviceData, manufacturerData = manufacturerData, + deviceId = macAdress, + name = deviceName, + rssi = rssi, + connectable = Connectable.UNKNOWN, + serviceData = serviceData, + manufacturerData = manufacturerData, serviceUuids = listOf(serviceUuid), ) } diff --git a/packages/reactive_ble_mobile/ios/Classes/BleData/bledata.pb.swift b/packages/reactive_ble_mobile/ios/Classes/BleData/bledata.pb.swift index df77587d..7f659fe1 100644 --- a/packages/reactive_ble_mobile/ios/Classes/BleData/bledata.pb.swift +++ b/packages/reactive_ble_mobile/ios/Classes/BleData/bledata.pb.swift @@ -62,11 +62,21 @@ struct DeviceScanInfo { var rssi: Int32 = 0 + var isConnectable: IsConnectable { + get {return _isConnectable ?? IsConnectable()} + set {_isConnectable = newValue} + } + /// Returns true if `isConnectable` has been explicitly set. + var hasIsConnectable: Bool {return self._isConnectable != nil} + /// Clears the value of `isConnectable`. Subsequent reads from it will return its default value. + mutating func clearIsConnectable() {self._isConnectable = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _failure: GenericFailure? = nil + fileprivate var _isConnectable: IsConnectable? = nil } struct ConnectToDeviceRequest { @@ -613,6 +623,50 @@ struct GenericFailure { init() {} } +struct IsConnectable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var code: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +#if swift(>=5.5) && canImport(_Concurrency) +extension ScanForDevicesRequest: @unchecked Sendable {} +extension DeviceScanInfo: @unchecked Sendable {} +extension ConnectToDeviceRequest: @unchecked Sendable {} +extension DeviceInfo: @unchecked Sendable {} +extension DisconnectFromDeviceRequest: @unchecked Sendable {} +extension ClearGattCacheRequest: @unchecked Sendable {} +extension ClearGattCacheInfo: @unchecked Sendable {} +extension NotifyCharacteristicRequest: @unchecked Sendable {} +extension NotifyNoMoreCharacteristicRequest: @unchecked Sendable {} +extension ReadCharacteristicRequest: @unchecked Sendable {} +extension CharacteristicValueInfo: @unchecked Sendable {} +extension WriteCharacteristicRequest: @unchecked Sendable {} +extension WriteCharacteristicInfo: @unchecked Sendable {} +extension NegotiateMtuRequest: @unchecked Sendable {} +extension NegotiateMtuInfo: @unchecked Sendable {} +extension BleStatusInfo: @unchecked Sendable {} +extension ChangeConnectionPriorityRequest: @unchecked Sendable {} +extension ChangeConnectionPriorityInfo: @unchecked Sendable {} +extension CharacteristicAddress: @unchecked Sendable {} +extension ServiceDataEntry: @unchecked Sendable {} +extension ServicesWithCharacteristics: @unchecked Sendable {} +extension ServiceWithCharacteristics: @unchecked Sendable {} +extension DiscoverServicesRequest: @unchecked Sendable {} +extension DiscoverServicesInfo: @unchecked Sendable {} +extension DiscoveredService: @unchecked Sendable {} +extension DiscoveredCharacteristic: @unchecked Sendable {} +extension Uuid: @unchecked Sendable {} +extension GenericFailure: @unchecked Sendable {} +extension IsConnectable: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. extension ScanForDevicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { @@ -669,6 +723,7 @@ extension DeviceScanInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement 6: .same(proto: "manufacturerData"), 7: .same(proto: "serviceUuids"), 5: .same(proto: "rssi"), + 8: .same(proto: "isConnectable"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -684,21 +739,26 @@ extension DeviceScanInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement case 5: try { try decoder.decodeSingularInt32Field(value: &self.rssi) }() case 6: try { try decoder.decodeSingularBytesField(value: &self.manufacturerData) }() case 7: try { try decoder.decodeRepeatedMessageField(value: &self.serviceUuids) }() + case 8: try { try decoder.decodeSingularMessageField(value: &self._isConnectable) }() default: break } } } func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } if !self.name.isEmpty { try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) } - if let v = self._failure { + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() if !self.serviceData.isEmpty { try visitor.visitRepeatedMessageField(value: self.serviceData, fieldNumber: 4) } @@ -711,6 +771,9 @@ extension DeviceScanInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if !self.serviceUuids.isEmpty { try visitor.visitRepeatedMessageField(value: self.serviceUuids, fieldNumber: 7) } + try { if let v = self._isConnectable { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -722,6 +785,7 @@ extension DeviceScanInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if lhs.manufacturerData != rhs.manufacturerData {return false} if lhs.serviceUuids != rhs.serviceUuids {return false} if lhs.rssi != rhs.rssi {return false} + if lhs._isConnectable != rhs._isConnectable {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -750,12 +814,16 @@ extension ConnectToDeviceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageI } func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.deviceID.isEmpty { try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) } - if let v = self._servicesWithCharacteristicsToDiscover { + try { if let v = self._servicesWithCharacteristicsToDiscover { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if self.timeoutInMs != 0 { try visitor.visitSingularInt32Field(value: self.timeoutInMs, fieldNumber: 3) } @@ -794,15 +862,19 @@ extension DeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio } func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } if self.connectionState != 0 { try visitor.visitSingularInt32Field(value: self.connectionState, fieldNumber: 2) } - if let v = self._failure { + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -898,9 +970,13 @@ extension ClearGattCacheInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } func traverse(visitor: inout V) throws { - if let v = self._failure { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -930,9 +1006,13 @@ extension NotifyCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._Mes } func traverse(visitor: inout V) throws { - if let v = self._characteristic { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristic { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -962,9 +1042,13 @@ extension NotifyNoMoreCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobu } func traverse(visitor: inout V) throws { - if let v = self._characteristic { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristic { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -994,9 +1078,13 @@ extension ReadCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._Messa } func traverse(visitor: inout V) throws { - if let v = self._characteristic { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristic { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1030,15 +1118,19 @@ extension CharacteristicValueInfo: SwiftProtobuf.Message, SwiftProtobuf._Message } func traverse(visitor: inout V) throws { - if let v = self._characteristic { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristic { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.value.isEmpty { try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) } - if let v = self._failure { + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1072,9 +1164,13 @@ extension WriteCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._Mess } func traverse(visitor: inout V) throws { - if let v = self._characteristic { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristic { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.value.isEmpty { try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) } @@ -1110,12 +1206,16 @@ extension WriteCharacteristicInfo: SwiftProtobuf.Message, SwiftProtobuf._Message } func traverse(visitor: inout V) throws { - if let v = self._characteristic { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristic { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = self._failure { + } }() + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1188,15 +1288,19 @@ extension NegotiateMtuInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme } func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.deviceID.isEmpty { try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) } if self.mtuSize != 0 { try visitor.visitSingularInt32Field(value: self.mtuSize, fieldNumber: 2) } - if let v = self._failure { + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1300,12 +1404,16 @@ extension ChangeConnectionPriorityInfo: SwiftProtobuf.Message, SwiftProtobuf._Me } func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.deviceID.isEmpty { try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) } - if let v = self._failure { + try { if let v = self._failure { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1340,15 +1448,19 @@ extension CharacteristicAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if !self.deviceID.isEmpty { try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) } - if let v = self._serviceUuid { + try { if let v = self._serviceUuid { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - if let v = self._characteristicUuid { + } }() + try { if let v = self._characteristicUuid { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1382,9 +1494,13 @@ extension ServiceDataEntry: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme } func traverse(visitor: inout V) throws { - if let v = self._serviceUuid { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._serviceUuid { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.data.isEmpty { try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) } @@ -1452,9 +1568,13 @@ extension ServiceWithCharacteristics: SwiftProtobuf.Message, SwiftProtobuf._Mess } func traverse(visitor: inout V) throws { - if let v = self._serviceID { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._serviceID { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.characteristics.isEmpty { try visitor.visitRepeatedMessageField(value: self.characteristics, fieldNumber: 2) } @@ -1564,9 +1684,13 @@ extension DiscoveredService: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } func traverse(visitor: inout V) throws { - if let v = self._serviceUuid { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._serviceUuid { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } + } }() if !self.characteristicUuids.isEmpty { try visitor.visitRepeatedMessageField(value: self.characteristicUuids, fieldNumber: 2) } @@ -1620,12 +1744,16 @@ extension DiscoveredCharacteristic: SwiftProtobuf.Message, SwiftProtobuf._Messag } func traverse(visitor: inout V) throws { - if let v = self._characteristicID { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._characteristicID { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } - if let v = self._serviceID { + } }() + try { if let v = self._serviceID { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } + } }() if self.isReadable != false { try visitor.visitSingularBoolField(value: self.isReadable, fieldNumber: 3) } @@ -1726,3 +1854,35 @@ extension GenericFailure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement return true } } + +extension IsConnectable: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = "IsConnectable" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "code"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.code) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.code != 0 { + try visitor.visitSingularInt32Field(value: self.code, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: IsConnectable, rhs: IsConnectable) -> Bool { + if lhs.code != rhs.code {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift b/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift index 77a6a641..7341fb22 100644 --- a/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift +++ b/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift @@ -4,6 +4,7 @@ import enum CoreBluetooth.CBManagerState import var CoreBluetooth.CBAdvertisementDataServiceDataKey import var CoreBluetooth.CBAdvertisementDataServiceUUIDsKey import var CoreBluetooth.CBAdvertisementDataManufacturerDataKey +import var CoreBluetooth.CBAdvertisementDataIsConnectable import var CoreBluetooth.CBAdvertisementDataLocalNameKey final class PluginController { @@ -41,13 +42,20 @@ final class PluginController { let serviceData = advertisementData[CBAdvertisementDataServiceDataKey] as? ServiceData ?? [:] let serviceUuids = advertisementData[CBAdvertisementDataServiceUUIDsKey] as? [CBUUID] ?? [] - let manufacturerData = advertisementData[CBAdvertisementDataManufacturerDataKey] as? Data ?? Data(); - let name = advertisementData[CBAdvertisementDataLocalNameKey] as? String ?? peripheral.name ?? String(); - + let isConnectable = (advertisementData[CBAdvertisementDataIsConnectable] as? NSNumber)?.boolValue + let manufacturerData = advertisementData[CBAdvertisementDataManufacturerDataKey] as? Data ?? Data() + let name = advertisementData[CBAdvertisementDataLocalNameKey] as? String ?? peripheral.name ?? String() let deviceDiscoveryMessage = DeviceScanInfo.with { $0.id = peripheral.identifier.uuidString $0.name = name $0.rssi = Int32(rssi) + $0.isConnectable = IsConnectable() + switch isConnectable { + case .none: + $0.isConnectable.code = 0 + case .some(let isConnectable): + $0.isConnectable.code = isConnectable ? 2 : 1 + } $0.serviceData = serviceData .map { entry in ServiceDataEntry.with { diff --git a/packages/reactive_ble_mobile/lib/src/converter/args_to_protubuf_converter.dart b/packages/reactive_ble_mobile/lib/src/converter/args_to_protubuf_converter.dart index 5885adfe..58584bef 100644 --- a/packages/reactive_ble_mobile/lib/src/converter/args_to_protubuf_converter.dart +++ b/packages/reactive_ble_mobile/lib/src/converter/args_to_protubuf_converter.dart @@ -180,7 +180,7 @@ class ArgsToProtobufConverterImpl implements ArgsToProtobufConverter { if (withServices != null) { for (final withService in withServices) { - args.serviceUuids.add((pb.Uuid()..data = withService.data)); + args.serviceUuids.add(pb.Uuid()..data = withService.data); } } diff --git a/packages/reactive_ble_mobile/lib/src/converter/protobuf_converter.dart b/packages/reactive_ble_mobile/lib/src/converter/protobuf_converter.dart index 4ca6d639..4a84df7e 100644 --- a/packages/reactive_ble_mobile/lib/src/converter/protobuf_converter.dart +++ b/packages/reactive_ble_mobile/lib/src/converter/protobuf_converter.dart @@ -62,6 +62,7 @@ class ProtobufConverterImpl implements ProtobufConverter { serviceUuids: serviceUuids, manufacturerData: Uint8List.fromList(message.manufacturerData), rssi: message.rssi, + connectable: _connectableFrom(message.isConnectable), ), failure: genericFailureFrom( hasFailure: message.hasFailure(), @@ -224,6 +225,19 @@ class ProtobufConverterImpl implements ProtobufConverter { failure != null ? Result.failure(failure) : Result.success(getValue()); + + Connectable _connectableFrom(pb.IsConnectable status) { + switch (status.code) { + case 0: + return Connectable.unknown; + case 1: + return Connectable.unavailable; + case 2: + return Connectable.available; + } + + return Connectable.unknown; + } } class _InvalidConnectionState extends Error { diff --git a/packages/reactive_ble_mobile/lib/src/generated/bledata.pb.dart b/packages/reactive_ble_mobile/lib/src/generated/bledata.pb.dart index b085f9ef..694a067a 100644 --- a/packages/reactive_ble_mobile/lib/src/generated/bledata.pb.dart +++ b/packages/reactive_ble_mobile/lib/src/generated/bledata.pb.dart @@ -1,88 +1,50 @@ -/// +// // Generated code. Do not modify. // source: bledata.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields + +// ignore_for_file: annotate_overrides, camel_case_types +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class ScanForDevicesRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ScanForDevicesRequest', - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceUuids', - $pb.PbFieldType.PM, - protoName: 'serviceUuids', - subBuilder: Uuid.create) - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'scanMode', - $pb.PbFieldType.O3, - protoName: 'scanMode') - ..aOB( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'requireLocationServicesEnabled', - protoName: 'requireLocationServicesEnabled') - ..hasRequiredFields = false; - + factory ScanForDevicesRequest() => create(); ScanForDevicesRequest._() : super(); - factory ScanForDevicesRequest({ - $core.Iterable? serviceUuids, - $core.int? scanMode, - $core.bool? requireLocationServicesEnabled, - }) { - final _result = create(); - if (serviceUuids != null) { - _result.serviceUuids.addAll(serviceUuids); - } - if (scanMode != null) { - _result.scanMode = scanMode; - } - if (requireLocationServicesEnabled != null) { - _result.requireLocationServicesEnabled = requireLocationServicesEnabled; - } - return _result; - } - factory ScanForDevicesRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ScanForDevicesRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ScanForDevicesRequest clone() => - ScanForDevicesRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ScanForDevicesRequest copyWith( - void Function(ScanForDevicesRequest) updates) => - super.copyWith((message) => updates(message as ScanForDevicesRequest)) - as ScanForDevicesRequest; // ignore: deprecated_member_use + factory ScanForDevicesRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ScanForDevicesRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ScanForDevicesRequest', createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'serviceUuids', $pb.PbFieldType.PM, protoName: 'serviceUuids', subBuilder: Uuid.create) + ..a<$core.int>(2, _omitFieldNames ? '' : 'scanMode', $pb.PbFieldType.O3, protoName: 'scanMode') + ..aOB(3, _omitFieldNames ? '' : 'requireLocationServicesEnabled', protoName: 'requireLocationServicesEnabled') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ScanForDevicesRequest clone() => ScanForDevicesRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ScanForDevicesRequest copyWith(void Function(ScanForDevicesRequest) updates) => super.copyWith((message) => updates(message as ScanForDevicesRequest)) as ScanForDevicesRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ScanForDevicesRequest create() => ScanForDevicesRequest._(); ScanForDevicesRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ScanForDevicesRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ScanForDevicesRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ScanForDevicesRequest? _defaultInstance; @$pb.TagNumber(1) @@ -91,10 +53,7 @@ class ScanForDevicesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get scanMode => $_getIZ(1); @$pb.TagNumber(2) - set scanMode($core.int v) { - $_setSignedInt32(1, v); - } - + set scanMode($core.int v) { $_setSignedInt32(1, v); } @$pb.TagNumber(2) $core.bool hasScanMode() => $_has(1); @$pb.TagNumber(2) @@ -103,10 +62,7 @@ class ScanForDevicesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.bool get requireLocationServicesEnabled => $_getBF(2); @$pb.TagNumber(3) - set requireLocationServicesEnabled($core.bool v) { - $_setBool(2, v); - } - + set requireLocationServicesEnabled($core.bool v) { $_setBool(2, v); } @$pb.TagNumber(3) $core.bool hasRequireLocationServicesEnabled() => $_has(2); @$pb.TagNumber(3) @@ -114,126 +70,48 @@ class ScanForDevicesRequest extends $pb.GeneratedMessage { } class DeviceScanInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DeviceScanInfo', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'id') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'name') - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..pc( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceData', - $pb.PbFieldType.PM, - protoName: 'serviceData', - subBuilder: ServiceDataEntry.create) - ..a<$core.int>( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'rssi', - $pb.PbFieldType.O3) - ..a<$core.List<$core.int>>( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'manufacturerData', - $pb.PbFieldType.OY, - protoName: 'manufacturerData') - ..pc( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceUuids', - $pb.PbFieldType.PM, - protoName: 'serviceUuids', - subBuilder: Uuid.create) - ..hasRequiredFields = false; - + factory DeviceScanInfo() => create(); DeviceScanInfo._() : super(); - factory DeviceScanInfo({ - $core.String? id, - $core.String? name, - GenericFailure? failure, - $core.Iterable? serviceData, - $core.int? rssi, - $core.List<$core.int>? manufacturerData, - $core.Iterable? serviceUuids, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (name != null) { - _result.name = name; - } - if (failure != null) { - _result.failure = failure; - } - if (serviceData != null) { - _result.serviceData.addAll(serviceData); - } - if (rssi != null) { - _result.rssi = rssi; - } - if (manufacturerData != null) { - _result.manufacturerData = manufacturerData; - } - if (serviceUuids != null) { - _result.serviceUuids.addAll(serviceUuids); - } - return _result; - } - factory DeviceScanInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DeviceScanInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory DeviceScanInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeviceScanInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeviceScanInfo', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aOM(3, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..pc(4, _omitFieldNames ? '' : 'serviceData', $pb.PbFieldType.PM, protoName: 'serviceData', subBuilder: ServiceDataEntry.create) + ..a<$core.int>(5, _omitFieldNames ? '' : 'rssi', $pb.PbFieldType.O3) + ..a<$core.List<$core.int>>(6, _omitFieldNames ? '' : 'manufacturerData', $pb.PbFieldType.OY, protoName: 'manufacturerData') + ..pc(7, _omitFieldNames ? '' : 'serviceUuids', $pb.PbFieldType.PM, protoName: 'serviceUuids', subBuilder: Uuid.create) + ..aOM(8, _omitFieldNames ? '' : 'isConnectable', protoName: 'isConnectable', subBuilder: IsConnectable.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') DeviceScanInfo clone() => DeviceScanInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DeviceScanInfo copyWith(void Function(DeviceScanInfo) updates) => - super.copyWith((message) => updates(message as DeviceScanInfo)) - as DeviceScanInfo; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DeviceScanInfo copyWith(void Function(DeviceScanInfo) updates) => super.copyWith((message) => updates(message as DeviceScanInfo)) as DeviceScanInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DeviceScanInfo create() => DeviceScanInfo._(); DeviceScanInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DeviceScanInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DeviceScanInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DeviceScanInfo? _defaultInstance; @$pb.TagNumber(1) $core.String get id => $_getSZ(0); @$pb.TagNumber(1) - set id($core.String v) { - $_setString(0, v); - } - + set id($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasId() => $_has(0); @$pb.TagNumber(1) @@ -242,10 +120,7 @@ class DeviceScanInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get name => $_getSZ(1); @$pb.TagNumber(2) - set name($core.String v) { - $_setString(1, v); - } - + set name($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasName() => $_has(1); @$pb.TagNumber(2) @@ -254,10 +129,7 @@ class DeviceScanInfo extends $pb.GeneratedMessage { @$pb.TagNumber(3) GenericFailure get failure => $_getN(2); @$pb.TagNumber(3) - set failure(GenericFailure v) { - setField(3, v); - } - + set failure(GenericFailure v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasFailure() => $_has(2); @$pb.TagNumber(3) @@ -271,10 +143,7 @@ class DeviceScanInfo extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.int get rssi => $_getIZ(4); @$pb.TagNumber(5) - set rssi($core.int v) { - $_setSignedInt32(4, v); - } - + set rssi($core.int v) { $_setSignedInt32(4, v); } @$pb.TagNumber(5) $core.bool hasRssi() => $_has(4); @$pb.TagNumber(5) @@ -283,10 +152,7 @@ class DeviceScanInfo extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.List<$core.int> get manufacturerData => $_getN(5); @$pb.TagNumber(6) - set manufacturerData($core.List<$core.int> v) { - $_setBytes(5, v); - } - + set manufacturerData($core.List<$core.int> v) { $_setBytes(5, v); } @$pb.TagNumber(6) $core.bool hasManufacturerData() => $_has(5); @$pb.TagNumber(6) @@ -294,119 +160,77 @@ class DeviceScanInfo extends $pb.GeneratedMessage { @$pb.TagNumber(7) $core.List get serviceUuids => $_getList(6); + + @$pb.TagNumber(8) + IsConnectable get isConnectable => $_getN(7); + @$pb.TagNumber(8) + set isConnectable(IsConnectable v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasIsConnectable() => $_has(7); + @$pb.TagNumber(8) + void clearIsConnectable() => clearField(8); + @$pb.TagNumber(8) + IsConnectable ensureIsConnectable() => $_ensure(7); } class ConnectToDeviceRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ConnectToDeviceRequest', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'servicesWithCharacteristicsToDiscover', - protoName: 'servicesWithCharacteristicsToDiscover', - subBuilder: ServicesWithCharacteristics.create) - ..a<$core.int>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'timeoutInMs', - $pb.PbFieldType.O3, - protoName: 'timeoutInMs') - ..hasRequiredFields = false; - + factory ConnectToDeviceRequest() => create(); ConnectToDeviceRequest._() : super(); - factory ConnectToDeviceRequest({ - $core.String? deviceId, - ServicesWithCharacteristics? servicesWithCharacteristicsToDiscover, - $core.int? timeoutInMs, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (servicesWithCharacteristicsToDiscover != null) { - _result.servicesWithCharacteristicsToDiscover = - servicesWithCharacteristicsToDiscover; - } - if (timeoutInMs != null) { - _result.timeoutInMs = timeoutInMs; - } - return _result; - } - factory ConnectToDeviceRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ConnectToDeviceRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ConnectToDeviceRequest clone() => - ConnectToDeviceRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ConnectToDeviceRequest copyWith( - void Function(ConnectToDeviceRequest) updates) => - super.copyWith((message) => updates(message as ConnectToDeviceRequest)) - as ConnectToDeviceRequest; // ignore: deprecated_member_use + factory ConnectToDeviceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ConnectToDeviceRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ConnectToDeviceRequest', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..aOM(2, _omitFieldNames ? '' : 'servicesWithCharacteristicsToDiscover', protoName: 'servicesWithCharacteristicsToDiscover', subBuilder: ServicesWithCharacteristics.create) + ..a<$core.int>(3, _omitFieldNames ? '' : 'timeoutInMs', $pb.PbFieldType.O3, protoName: 'timeoutInMs') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ConnectToDeviceRequest clone() => ConnectToDeviceRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ConnectToDeviceRequest copyWith(void Function(ConnectToDeviceRequest) updates) => super.copyWith((message) => updates(message as ConnectToDeviceRequest)) as ConnectToDeviceRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ConnectToDeviceRequest create() => ConnectToDeviceRequest._(); ConnectToDeviceRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ConnectToDeviceRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ConnectToDeviceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ConnectToDeviceRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) void clearDeviceId() => clearField(1); @$pb.TagNumber(2) - ServicesWithCharacteristics get servicesWithCharacteristicsToDiscover => - $_getN(1); + ServicesWithCharacteristics get servicesWithCharacteristicsToDiscover => $_getN(1); @$pb.TagNumber(2) - set servicesWithCharacteristicsToDiscover(ServicesWithCharacteristics v) { - setField(2, v); - } - + set servicesWithCharacteristicsToDiscover(ServicesWithCharacteristics v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasServicesWithCharacteristicsToDiscover() => $_has(1); @$pb.TagNumber(2) void clearServicesWithCharacteristicsToDiscover() => clearField(2); @$pb.TagNumber(2) - ServicesWithCharacteristics ensureServicesWithCharacteristicsToDiscover() => - $_ensure(1); + ServicesWithCharacteristics ensureServicesWithCharacteristicsToDiscover() => $_ensure(1); @$pb.TagNumber(3) $core.int get timeoutInMs => $_getIZ(2); @$pb.TagNumber(3) - set timeoutInMs($core.int v) { - $_setSignedInt32(2, v); - } - + set timeoutInMs($core.int v) { $_setSignedInt32(2, v); } @$pb.TagNumber(3) $core.bool hasTimeoutInMs() => $_has(2); @$pb.TagNumber(3) @@ -414,82 +238,43 @@ class ConnectToDeviceRequest extends $pb.GeneratedMessage { } class DeviceInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DeviceInfo', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'id') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'connectionState', - $pb.PbFieldType.O3, - protoName: 'connectionState') - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..hasRequiredFields = false; - + factory DeviceInfo() => create(); DeviceInfo._() : super(); - factory DeviceInfo({ - $core.String? id, - $core.int? connectionState, - GenericFailure? failure, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (connectionState != null) { - _result.connectionState = connectionState; - } - if (failure != null) { - _result.failure = failure; - } - return _result; - } - factory DeviceInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DeviceInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory DeviceInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeviceInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeviceInfo', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..a<$core.int>(2, _omitFieldNames ? '' : 'connectionState', $pb.PbFieldType.O3, protoName: 'connectionState') + ..aOM(3, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') DeviceInfo clone() => DeviceInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DeviceInfo copyWith(void Function(DeviceInfo) updates) => - super.copyWith((message) => updates(message as DeviceInfo)) - as DeviceInfo; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DeviceInfo copyWith(void Function(DeviceInfo) updates) => super.copyWith((message) => updates(message as DeviceInfo)) as DeviceInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DeviceInfo create() => DeviceInfo._(); DeviceInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DeviceInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DeviceInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DeviceInfo? _defaultInstance; @$pb.TagNumber(1) $core.String get id => $_getSZ(0); @$pb.TagNumber(1) - set id($core.String v) { - $_setString(0, v); - } - + set id($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasId() => $_has(0); @$pb.TagNumber(1) @@ -498,10 +283,7 @@ class DeviceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get connectionState => $_getIZ(1); @$pb.TagNumber(2) - set connectionState($core.int v) { - $_setSignedInt32(1, v); - } - + set connectionState($core.int v) { $_setSignedInt32(1, v); } @$pb.TagNumber(2) $core.bool hasConnectionState() => $_has(1); @$pb.TagNumber(2) @@ -510,10 +292,7 @@ class DeviceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(3) GenericFailure get failure => $_getN(2); @$pb.TagNumber(3) - set failure(GenericFailure v) { - setField(3, v); - } - + set failure(GenericFailure v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasFailure() => $_has(2); @$pb.TagNumber(3) @@ -523,67 +302,41 @@ class DeviceInfo extends $pb.GeneratedMessage { } class DisconnectFromDeviceRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DisconnectFromDeviceRequest', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..hasRequiredFields = false; - + factory DisconnectFromDeviceRequest() => create(); DisconnectFromDeviceRequest._() : super(); - factory DisconnectFromDeviceRequest({ - $core.String? deviceId, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - return _result; - } - factory DisconnectFromDeviceRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DisconnectFromDeviceRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DisconnectFromDeviceRequest clone() => - DisconnectFromDeviceRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DisconnectFromDeviceRequest copyWith( - void Function(DisconnectFromDeviceRequest) updates) => - super.copyWith( - (message) => updates(message as DisconnectFromDeviceRequest)) - as DisconnectFromDeviceRequest; // ignore: deprecated_member_use + factory DisconnectFromDeviceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DisconnectFromDeviceRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DisconnectFromDeviceRequest', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DisconnectFromDeviceRequest clone() => DisconnectFromDeviceRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DisconnectFromDeviceRequest copyWith(void Function(DisconnectFromDeviceRequest) updates) => super.copyWith((message) => updates(message as DisconnectFromDeviceRequest)) as DisconnectFromDeviceRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') - static DisconnectFromDeviceRequest create() => - DisconnectFromDeviceRequest._(); + static DisconnectFromDeviceRequest create() => DisconnectFromDeviceRequest._(); DisconnectFromDeviceRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DisconnectFromDeviceRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DisconnectFromDeviceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DisconnectFromDeviceRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -591,65 +344,41 @@ class DisconnectFromDeviceRequest extends $pb.GeneratedMessage { } class ClearGattCacheRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ClearGattCacheRequest', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..hasRequiredFields = false; - + factory ClearGattCacheRequest() => create(); ClearGattCacheRequest._() : super(); - factory ClearGattCacheRequest({ - $core.String? deviceId, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - return _result; - } - factory ClearGattCacheRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ClearGattCacheRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ClearGattCacheRequest clone() => - ClearGattCacheRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ClearGattCacheRequest copyWith( - void Function(ClearGattCacheRequest) updates) => - super.copyWith((message) => updates(message as ClearGattCacheRequest)) - as ClearGattCacheRequest; // ignore: deprecated_member_use + factory ClearGattCacheRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ClearGattCacheRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ClearGattCacheRequest', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ClearGattCacheRequest clone() => ClearGattCacheRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ClearGattCacheRequest copyWith(void Function(ClearGattCacheRequest) updates) => super.copyWith((message) => updates(message as ClearGattCacheRequest)) as ClearGattCacheRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ClearGattCacheRequest create() => ClearGattCacheRequest._(); ClearGattCacheRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ClearGattCacheRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ClearGattCacheRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ClearGattCacheRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -657,63 +386,41 @@ class ClearGattCacheRequest extends $pb.GeneratedMessage { } class ClearGattCacheInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ClearGattCacheInfo', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..hasRequiredFields = false; - + factory ClearGattCacheInfo() => create(); ClearGattCacheInfo._() : super(); - factory ClearGattCacheInfo({ - GenericFailure? failure, - }) { - final _result = create(); - if (failure != null) { - _result.failure = failure; - } - return _result; - } - factory ClearGattCacheInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ClearGattCacheInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory ClearGattCacheInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ClearGattCacheInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ClearGattCacheInfo', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') ClearGattCacheInfo clone() => ClearGattCacheInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ClearGattCacheInfo copyWith(void Function(ClearGattCacheInfo) updates) => - super.copyWith((message) => updates(message as ClearGattCacheInfo)) - as ClearGattCacheInfo; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ClearGattCacheInfo copyWith(void Function(ClearGattCacheInfo) updates) => super.copyWith((message) => updates(message as ClearGattCacheInfo)) as ClearGattCacheInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ClearGattCacheInfo create() => ClearGattCacheInfo._(); ClearGattCacheInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ClearGattCacheInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ClearGattCacheInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ClearGattCacheInfo? _defaultInstance; @$pb.TagNumber(1) GenericFailure get failure => $_getN(0); @$pb.TagNumber(1) - set failure(GenericFailure v) { - setField(1, v); - } - + set failure(GenericFailure v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasFailure() => $_has(0); @$pb.TagNumber(1) @@ -723,67 +430,41 @@ class ClearGattCacheInfo extends $pb.GeneratedMessage { } class NotifyCharacteristicRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'NotifyCharacteristicRequest', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristic', - subBuilder: CharacteristicAddress.create) - ..hasRequiredFields = false; - + factory NotifyCharacteristicRequest() => create(); NotifyCharacteristicRequest._() : super(); - factory NotifyCharacteristicRequest({ - CharacteristicAddress? characteristic, - }) { - final _result = create(); - if (characteristic != null) { - _result.characteristic = characteristic; - } - return _result; - } - factory NotifyCharacteristicRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory NotifyCharacteristicRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - NotifyCharacteristicRequest clone() => - NotifyCharacteristicRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - NotifyCharacteristicRequest copyWith( - void Function(NotifyCharacteristicRequest) updates) => - super.copyWith( - (message) => updates(message as NotifyCharacteristicRequest)) - as NotifyCharacteristicRequest; // ignore: deprecated_member_use + factory NotifyCharacteristicRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NotifyCharacteristicRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NotifyCharacteristicRequest', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristic', subBuilder: CharacteristicAddress.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + NotifyCharacteristicRequest clone() => NotifyCharacteristicRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NotifyCharacteristicRequest copyWith(void Function(NotifyCharacteristicRequest) updates) => super.copyWith((message) => updates(message as NotifyCharacteristicRequest)) as NotifyCharacteristicRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') - static NotifyCharacteristicRequest create() => - NotifyCharacteristicRequest._(); + static NotifyCharacteristicRequest create() => NotifyCharacteristicRequest._(); NotifyCharacteristicRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static NotifyCharacteristicRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static NotifyCharacteristicRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static NotifyCharacteristicRequest? _defaultInstance; @$pb.TagNumber(1) CharacteristicAddress get characteristic => $_getN(0); @$pb.TagNumber(1) - set characteristic(CharacteristicAddress v) { - setField(1, v); - } - + set characteristic(CharacteristicAddress v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristic() => $_has(0); @$pb.TagNumber(1) @@ -793,68 +474,41 @@ class NotifyCharacteristicRequest extends $pb.GeneratedMessage { } class NotifyNoMoreCharacteristicRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'NotifyNoMoreCharacteristicRequest', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristic', - subBuilder: CharacteristicAddress.create) - ..hasRequiredFields = false; - + factory NotifyNoMoreCharacteristicRequest() => create(); NotifyNoMoreCharacteristicRequest._() : super(); - factory NotifyNoMoreCharacteristicRequest({ - CharacteristicAddress? characteristic, - }) { - final _result = create(); - if (characteristic != null) { - _result.characteristic = characteristic; - } - return _result; - } - factory NotifyNoMoreCharacteristicRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory NotifyNoMoreCharacteristicRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - NotifyNoMoreCharacteristicRequest clone() => - NotifyNoMoreCharacteristicRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - NotifyNoMoreCharacteristicRequest copyWith( - void Function(NotifyNoMoreCharacteristicRequest) updates) => - super.copyWith((message) => - updates(message as NotifyNoMoreCharacteristicRequest)) - as NotifyNoMoreCharacteristicRequest; // ignore: deprecated_member_use + factory NotifyNoMoreCharacteristicRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NotifyNoMoreCharacteristicRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NotifyNoMoreCharacteristicRequest', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristic', subBuilder: CharacteristicAddress.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + NotifyNoMoreCharacteristicRequest clone() => NotifyNoMoreCharacteristicRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NotifyNoMoreCharacteristicRequest copyWith(void Function(NotifyNoMoreCharacteristicRequest) updates) => super.copyWith((message) => updates(message as NotifyNoMoreCharacteristicRequest)) as NotifyNoMoreCharacteristicRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') - static NotifyNoMoreCharacteristicRequest create() => - NotifyNoMoreCharacteristicRequest._(); + static NotifyNoMoreCharacteristicRequest create() => NotifyNoMoreCharacteristicRequest._(); NotifyNoMoreCharacteristicRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static NotifyNoMoreCharacteristicRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static NotifyNoMoreCharacteristicRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static NotifyNoMoreCharacteristicRequest? _defaultInstance; @$pb.TagNumber(1) CharacteristicAddress get characteristic => $_getN(0); @$pb.TagNumber(1) - set characteristic(CharacteristicAddress v) { - setField(1, v); - } - + set characteristic(CharacteristicAddress v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristic() => $_has(0); @$pb.TagNumber(1) @@ -864,65 +518,41 @@ class NotifyNoMoreCharacteristicRequest extends $pb.GeneratedMessage { } class ReadCharacteristicRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ReadCharacteristicRequest', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristic', - subBuilder: CharacteristicAddress.create) - ..hasRequiredFields = false; - + factory ReadCharacteristicRequest() => create(); ReadCharacteristicRequest._() : super(); - factory ReadCharacteristicRequest({ - CharacteristicAddress? characteristic, - }) { - final _result = create(); - if (characteristic != null) { - _result.characteristic = characteristic; - } - return _result; - } - factory ReadCharacteristicRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ReadCharacteristicRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ReadCharacteristicRequest clone() => - ReadCharacteristicRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ReadCharacteristicRequest copyWith( - void Function(ReadCharacteristicRequest) updates) => - super.copyWith((message) => updates(message as ReadCharacteristicRequest)) - as ReadCharacteristicRequest; // ignore: deprecated_member_use + factory ReadCharacteristicRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ReadCharacteristicRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ReadCharacteristicRequest', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristic', subBuilder: CharacteristicAddress.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ReadCharacteristicRequest clone() => ReadCharacteristicRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ReadCharacteristicRequest copyWith(void Function(ReadCharacteristicRequest) updates) => super.copyWith((message) => updates(message as ReadCharacteristicRequest)) as ReadCharacteristicRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ReadCharacteristicRequest create() => ReadCharacteristicRequest._(); ReadCharacteristicRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ReadCharacteristicRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ReadCharacteristicRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ReadCharacteristicRequest? _defaultInstance; @$pb.TagNumber(1) CharacteristicAddress get characteristic => $_getN(0); @$pb.TagNumber(1) - set characteristic(CharacteristicAddress v) { - setField(1, v); - } - + set characteristic(CharacteristicAddress v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristic() => $_has(0); @$pb.TagNumber(1) @@ -932,85 +562,43 @@ class ReadCharacteristicRequest extends $pb.GeneratedMessage { } class CharacteristicValueInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'CharacteristicValueInfo', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristic', - subBuilder: CharacteristicAddress.create) - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OY) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..hasRequiredFields = false; - + factory CharacteristicValueInfo() => create(); CharacteristicValueInfo._() : super(); - factory CharacteristicValueInfo({ - CharacteristicAddress? characteristic, - $core.List<$core.int>? value, - GenericFailure? failure, - }) { - final _result = create(); - if (characteristic != null) { - _result.characteristic = characteristic; - } - if (value != null) { - _result.value = value; - } - if (failure != null) { - _result.failure = failure; - } - return _result; - } - factory CharacteristicValueInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory CharacteristicValueInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CharacteristicValueInfo clone() => - CharacteristicValueInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CharacteristicValueInfo copyWith( - void Function(CharacteristicValueInfo) updates) => - super.copyWith((message) => updates(message as CharacteristicValueInfo)) - as CharacteristicValueInfo; // ignore: deprecated_member_use + factory CharacteristicValueInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CharacteristicValueInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CharacteristicValueInfo', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristic', subBuilder: CharacteristicAddress.create) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) + ..aOM(3, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CharacteristicValueInfo clone() => CharacteristicValueInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CharacteristicValueInfo copyWith(void Function(CharacteristicValueInfo) updates) => super.copyWith((message) => updates(message as CharacteristicValueInfo)) as CharacteristicValueInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static CharacteristicValueInfo create() => CharacteristicValueInfo._(); CharacteristicValueInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static CharacteristicValueInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static CharacteristicValueInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static CharacteristicValueInfo? _defaultInstance; @$pb.TagNumber(1) CharacteristicAddress get characteristic => $_getN(0); @$pb.TagNumber(1) - set characteristic(CharacteristicAddress v) { - setField(1, v); - } - + set characteristic(CharacteristicAddress v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristic() => $_has(0); @$pb.TagNumber(1) @@ -1021,10 +609,7 @@ class CharacteristicValueInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.List<$core.int> get value => $_getN(1); @$pb.TagNumber(2) - set value($core.List<$core.int> v) { - $_setBytes(1, v); - } - + set value($core.List<$core.int> v) { $_setBytes(1, v); } @$pb.TagNumber(2) $core.bool hasValue() => $_has(1); @$pb.TagNumber(2) @@ -1033,10 +618,7 @@ class CharacteristicValueInfo extends $pb.GeneratedMessage { @$pb.TagNumber(3) GenericFailure get failure => $_getN(2); @$pb.TagNumber(3) - set failure(GenericFailure v) { - setField(3, v); - } - + set failure(GenericFailure v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasFailure() => $_has(2); @$pb.TagNumber(3) @@ -1046,76 +628,42 @@ class CharacteristicValueInfo extends $pb.GeneratedMessage { } class WriteCharacteristicRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'WriteCharacteristicRequest', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristic', - subBuilder: CharacteristicAddress.create) - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - + factory WriteCharacteristicRequest() => create(); WriteCharacteristicRequest._() : super(); - factory WriteCharacteristicRequest({ - CharacteristicAddress? characteristic, - $core.List<$core.int>? value, - }) { - final _result = create(); - if (characteristic != null) { - _result.characteristic = characteristic; - } - if (value != null) { - _result.value = value; - } - return _result; - } - factory WriteCharacteristicRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory WriteCharacteristicRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WriteCharacteristicRequest clone() => - WriteCharacteristicRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - WriteCharacteristicRequest copyWith( - void Function(WriteCharacteristicRequest) updates) => - super.copyWith( - (message) => updates(message as WriteCharacteristicRequest)) - as WriteCharacteristicRequest; // ignore: deprecated_member_use + factory WriteCharacteristicRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WriteCharacteristicRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'WriteCharacteristicRequest', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristic', subBuilder: CharacteristicAddress.create) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + WriteCharacteristicRequest clone() => WriteCharacteristicRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WriteCharacteristicRequest copyWith(void Function(WriteCharacteristicRequest) updates) => super.copyWith((message) => updates(message as WriteCharacteristicRequest)) as WriteCharacteristicRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static WriteCharacteristicRequest create() => WriteCharacteristicRequest._(); WriteCharacteristicRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static WriteCharacteristicRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static WriteCharacteristicRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static WriteCharacteristicRequest? _defaultInstance; @$pb.TagNumber(1) CharacteristicAddress get characteristic => $_getN(0); @$pb.TagNumber(1) - set characteristic(CharacteristicAddress v) { - setField(1, v); - } - + set characteristic(CharacteristicAddress v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristic() => $_has(0); @$pb.TagNumber(1) @@ -1126,10 +674,7 @@ class WriteCharacteristicRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.List<$core.int> get value => $_getN(1); @$pb.TagNumber(2) - set value($core.List<$core.int> v) { - $_setBytes(1, v); - } - + set value($core.List<$core.int> v) { $_setBytes(1, v); } @$pb.TagNumber(2) $core.bool hasValue() => $_has(1); @$pb.TagNumber(2) @@ -1137,75 +682,42 @@ class WriteCharacteristicRequest extends $pb.GeneratedMessage { } class WriteCharacteristicInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'WriteCharacteristicInfo', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristic', - subBuilder: CharacteristicAddress.create) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..hasRequiredFields = false; - + factory WriteCharacteristicInfo() => create(); WriteCharacteristicInfo._() : super(); - factory WriteCharacteristicInfo({ - CharacteristicAddress? characteristic, - GenericFailure? failure, - }) { - final _result = create(); - if (characteristic != null) { - _result.characteristic = characteristic; - } - if (failure != null) { - _result.failure = failure; - } - return _result; - } - factory WriteCharacteristicInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory WriteCharacteristicInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WriteCharacteristicInfo clone() => - WriteCharacteristicInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - WriteCharacteristicInfo copyWith( - void Function(WriteCharacteristicInfo) updates) => - super.copyWith((message) => updates(message as WriteCharacteristicInfo)) - as WriteCharacteristicInfo; // ignore: deprecated_member_use + factory WriteCharacteristicInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WriteCharacteristicInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'WriteCharacteristicInfo', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristic', subBuilder: CharacteristicAddress.create) + ..aOM(3, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + WriteCharacteristicInfo clone() => WriteCharacteristicInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WriteCharacteristicInfo copyWith(void Function(WriteCharacteristicInfo) updates) => super.copyWith((message) => updates(message as WriteCharacteristicInfo)) as WriteCharacteristicInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static WriteCharacteristicInfo create() => WriteCharacteristicInfo._(); WriteCharacteristicInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static WriteCharacteristicInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static WriteCharacteristicInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static WriteCharacteristicInfo? _defaultInstance; @$pb.TagNumber(1) CharacteristicAddress get characteristic => $_getN(0); @$pb.TagNumber(1) - set characteristic(CharacteristicAddress v) { - setField(1, v); - } - + set characteristic(CharacteristicAddress v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristic() => $_has(0); @$pb.TagNumber(1) @@ -1216,10 +728,7 @@ class WriteCharacteristicInfo extends $pb.GeneratedMessage { @$pb.TagNumber(3) GenericFailure get failure => $_getN(1); @$pb.TagNumber(3) - set failure(GenericFailure v) { - setField(3, v); - } - + set failure(GenericFailure v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasFailure() => $_has(1); @$pb.TagNumber(3) @@ -1229,74 +738,42 @@ class WriteCharacteristicInfo extends $pb.GeneratedMessage { } class NegotiateMtuRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'NegotiateMtuRequest', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'mtuSize', - $pb.PbFieldType.O3, - protoName: 'mtuSize') - ..hasRequiredFields = false; - + factory NegotiateMtuRequest() => create(); NegotiateMtuRequest._() : super(); - factory NegotiateMtuRequest({ - $core.String? deviceId, - $core.int? mtuSize, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (mtuSize != null) { - _result.mtuSize = mtuSize; - } - return _result; - } - factory NegotiateMtuRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory NegotiateMtuRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory NegotiateMtuRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NegotiateMtuRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NegotiateMtuRequest', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..a<$core.int>(2, _omitFieldNames ? '' : 'mtuSize', $pb.PbFieldType.O3, protoName: 'mtuSize') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') NegotiateMtuRequest clone() => NegotiateMtuRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - NegotiateMtuRequest copyWith(void Function(NegotiateMtuRequest) updates) => - super.copyWith((message) => updates(message as NegotiateMtuRequest)) - as NegotiateMtuRequest; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NegotiateMtuRequest copyWith(void Function(NegotiateMtuRequest) updates) => super.copyWith((message) => updates(message as NegotiateMtuRequest)) as NegotiateMtuRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static NegotiateMtuRequest create() => NegotiateMtuRequest._(); NegotiateMtuRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static NegotiateMtuRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static NegotiateMtuRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static NegotiateMtuRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -1305,10 +782,7 @@ class NegotiateMtuRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get mtuSize => $_getIZ(1); @$pb.TagNumber(2) - set mtuSize($core.int v) { - $_setSignedInt32(1, v); - } - + set mtuSize($core.int v) { $_setSignedInt32(1, v); } @$pb.TagNumber(2) $core.bool hasMtuSize() => $_has(1); @$pb.TagNumber(2) @@ -1316,84 +790,43 @@ class NegotiateMtuRequest extends $pb.GeneratedMessage { } class NegotiateMtuInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'NegotiateMtuInfo', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'mtuSize', - $pb.PbFieldType.O3, - protoName: 'mtuSize') - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..hasRequiredFields = false; - + factory NegotiateMtuInfo() => create(); NegotiateMtuInfo._() : super(); - factory NegotiateMtuInfo({ - $core.String? deviceId, - $core.int? mtuSize, - GenericFailure? failure, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (mtuSize != null) { - _result.mtuSize = mtuSize; - } - if (failure != null) { - _result.failure = failure; - } - return _result; - } - factory NegotiateMtuInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory NegotiateMtuInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory NegotiateMtuInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NegotiateMtuInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NegotiateMtuInfo', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..a<$core.int>(2, _omitFieldNames ? '' : 'mtuSize', $pb.PbFieldType.O3, protoName: 'mtuSize') + ..aOM(3, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') NegotiateMtuInfo clone() => NegotiateMtuInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - NegotiateMtuInfo copyWith(void Function(NegotiateMtuInfo) updates) => - super.copyWith((message) => updates(message as NegotiateMtuInfo)) - as NegotiateMtuInfo; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NegotiateMtuInfo copyWith(void Function(NegotiateMtuInfo) updates) => super.copyWith((message) => updates(message as NegotiateMtuInfo)) as NegotiateMtuInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static NegotiateMtuInfo create() => NegotiateMtuInfo._(); NegotiateMtuInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static NegotiateMtuInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static NegotiateMtuInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static NegotiateMtuInfo? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -1402,10 +835,7 @@ class NegotiateMtuInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get mtuSize => $_getIZ(1); @$pb.TagNumber(2) - set mtuSize($core.int v) { - $_setSignedInt32(1, v); - } - + set mtuSize($core.int v) { $_setSignedInt32(1, v); } @$pb.TagNumber(2) $core.bool hasMtuSize() => $_has(1); @$pb.TagNumber(2) @@ -1414,10 +844,7 @@ class NegotiateMtuInfo extends $pb.GeneratedMessage { @$pb.TagNumber(3) GenericFailure get failure => $_getN(2); @$pb.TagNumber(3) - set failure(GenericFailure v) { - setField(3, v); - } - + set failure(GenericFailure v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasFailure() => $_has(2); @$pb.TagNumber(3) @@ -1427,63 +854,41 @@ class NegotiateMtuInfo extends $pb.GeneratedMessage { } class BleStatusInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BleStatusInfo', - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'status', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - + factory BleStatusInfo() => create(); BleStatusInfo._() : super(); - factory BleStatusInfo({ - $core.int? status, - }) { - final _result = create(); - if (status != null) { - _result.status = status; - } - return _result; - } - factory BleStatusInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory BleStatusInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory BleStatusInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BleStatusInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleStatusInfo', createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'status', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') BleStatusInfo clone() => BleStatusInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BleStatusInfo copyWith(void Function(BleStatusInfo) updates) => - super.copyWith((message) => updates(message as BleStatusInfo)) - as BleStatusInfo; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BleStatusInfo copyWith(void Function(BleStatusInfo) updates) => super.copyWith((message) => updates(message as BleStatusInfo)) as BleStatusInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BleStatusInfo create() => BleStatusInfo._(); BleStatusInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static BleStatusInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static BleStatusInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static BleStatusInfo? _defaultInstance; @$pb.TagNumber(1) $core.int get status => $_getIZ(0); @$pb.TagNumber(1) - set status($core.int v) { - $_setSignedInt32(0, v); - } - + set status($core.int v) { $_setSignedInt32(0, v); } @$pb.TagNumber(1) $core.bool hasStatus() => $_has(0); @$pb.TagNumber(1) @@ -1491,78 +896,42 @@ class BleStatusInfo extends $pb.GeneratedMessage { } class ChangeConnectionPriorityRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ChangeConnectionPriorityRequest', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'priority', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - + factory ChangeConnectionPriorityRequest() => create(); ChangeConnectionPriorityRequest._() : super(); - factory ChangeConnectionPriorityRequest({ - $core.String? deviceId, - $core.int? priority, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (priority != null) { - _result.priority = priority; - } - return _result; - } - factory ChangeConnectionPriorityRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ChangeConnectionPriorityRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ChangeConnectionPriorityRequest clone() => - ChangeConnectionPriorityRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ChangeConnectionPriorityRequest copyWith( - void Function(ChangeConnectionPriorityRequest) updates) => - super.copyWith( - (message) => updates(message as ChangeConnectionPriorityRequest)) - as ChangeConnectionPriorityRequest; // ignore: deprecated_member_use + factory ChangeConnectionPriorityRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChangeConnectionPriorityRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeConnectionPriorityRequest', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..a<$core.int>(2, _omitFieldNames ? '' : 'priority', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChangeConnectionPriorityRequest clone() => ChangeConnectionPriorityRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChangeConnectionPriorityRequest copyWith(void Function(ChangeConnectionPriorityRequest) updates) => super.copyWith((message) => updates(message as ChangeConnectionPriorityRequest)) as ChangeConnectionPriorityRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') - static ChangeConnectionPriorityRequest create() => - ChangeConnectionPriorityRequest._(); + static ChangeConnectionPriorityRequest create() => ChangeConnectionPriorityRequest._(); ChangeConnectionPriorityRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ChangeConnectionPriorityRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static ChangeConnectionPriorityRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ChangeConnectionPriorityRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -1571,10 +940,7 @@ class ChangeConnectionPriorityRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get priority => $_getIZ(1); @$pb.TagNumber(2) - set priority($core.int v) { - $_setSignedInt32(1, v); - } - + set priority($core.int v) { $_setSignedInt32(1, v); } @$pb.TagNumber(2) $core.bool hasPriority() => $_has(1); @$pb.TagNumber(2) @@ -1582,77 +948,42 @@ class ChangeConnectionPriorityRequest extends $pb.GeneratedMessage { } class ChangeConnectionPriorityInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ChangeConnectionPriorityInfo', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'failure', - subBuilder: GenericFailure.create) - ..hasRequiredFields = false; - + factory ChangeConnectionPriorityInfo() => create(); ChangeConnectionPriorityInfo._() : super(); - factory ChangeConnectionPriorityInfo({ - $core.String? deviceId, - GenericFailure? failure, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (failure != null) { - _result.failure = failure; - } - return _result; - } - factory ChangeConnectionPriorityInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ChangeConnectionPriorityInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ChangeConnectionPriorityInfo clone() => - ChangeConnectionPriorityInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ChangeConnectionPriorityInfo copyWith( - void Function(ChangeConnectionPriorityInfo) updates) => - super.copyWith( - (message) => updates(message as ChangeConnectionPriorityInfo)) - as ChangeConnectionPriorityInfo; // ignore: deprecated_member_use + factory ChangeConnectionPriorityInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChangeConnectionPriorityInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeConnectionPriorityInfo', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..aOM(2, _omitFieldNames ? '' : 'failure', subBuilder: GenericFailure.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChangeConnectionPriorityInfo clone() => ChangeConnectionPriorityInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChangeConnectionPriorityInfo copyWith(void Function(ChangeConnectionPriorityInfo) updates) => super.copyWith((message) => updates(message as ChangeConnectionPriorityInfo)) as ChangeConnectionPriorityInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') - static ChangeConnectionPriorityInfo create() => - ChangeConnectionPriorityInfo._(); + static ChangeConnectionPriorityInfo create() => ChangeConnectionPriorityInfo._(); ChangeConnectionPriorityInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ChangeConnectionPriorityInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ChangeConnectionPriorityInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ChangeConnectionPriorityInfo? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -1661,10 +992,7 @@ class ChangeConnectionPriorityInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) GenericFailure get failure => $_getN(1); @$pb.TagNumber(2) - set failure(GenericFailure v) { - setField(2, v); - } - + set failure(GenericFailure v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasFailure() => $_has(1); @$pb.TagNumber(2) @@ -1674,87 +1002,43 @@ class ChangeConnectionPriorityInfo extends $pb.GeneratedMessage { } class CharacteristicAddress extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'CharacteristicAddress', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceUuid', - protoName: 'serviceUuid', - subBuilder: Uuid.create) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristicUuid', - protoName: 'characteristicUuid', - subBuilder: Uuid.create) - ..hasRequiredFields = false; - + factory CharacteristicAddress() => create(); CharacteristicAddress._() : super(); - factory CharacteristicAddress({ - $core.String? deviceId, - Uuid? serviceUuid, - Uuid? characteristicUuid, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (serviceUuid != null) { - _result.serviceUuid = serviceUuid; - } - if (characteristicUuid != null) { - _result.characteristicUuid = characteristicUuid; - } - return _result; - } - factory CharacteristicAddress.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory CharacteristicAddress.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CharacteristicAddress clone() => - CharacteristicAddress()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CharacteristicAddress copyWith( - void Function(CharacteristicAddress) updates) => - super.copyWith((message) => updates(message as CharacteristicAddress)) - as CharacteristicAddress; // ignore: deprecated_member_use + factory CharacteristicAddress.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CharacteristicAddress.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CharacteristicAddress', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..aOM(2, _omitFieldNames ? '' : 'serviceUuid', protoName: 'serviceUuid', subBuilder: Uuid.create) + ..aOM(3, _omitFieldNames ? '' : 'characteristicUuid', protoName: 'characteristicUuid', subBuilder: Uuid.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CharacteristicAddress clone() => CharacteristicAddress()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CharacteristicAddress copyWith(void Function(CharacteristicAddress) updates) => super.copyWith((message) => updates(message as CharacteristicAddress)) as CharacteristicAddress; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static CharacteristicAddress create() => CharacteristicAddress._(); CharacteristicAddress createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static CharacteristicAddress getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static CharacteristicAddress getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static CharacteristicAddress? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -1763,10 +1047,7 @@ class CharacteristicAddress extends $pb.GeneratedMessage { @$pb.TagNumber(2) Uuid get serviceUuid => $_getN(1); @$pb.TagNumber(2) - set serviceUuid(Uuid v) { - setField(2, v); - } - + set serviceUuid(Uuid v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasServiceUuid() => $_has(1); @$pb.TagNumber(2) @@ -1777,10 +1058,7 @@ class CharacteristicAddress extends $pb.GeneratedMessage { @$pb.TagNumber(3) Uuid get characteristicUuid => $_getN(2); @$pb.TagNumber(3) - set characteristicUuid(Uuid v) { - setField(3, v); - } - + set characteristicUuid(Uuid v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasCharacteristicUuid() => $_has(2); @$pb.TagNumber(3) @@ -1790,74 +1068,42 @@ class CharacteristicAddress extends $pb.GeneratedMessage { } class ServiceDataEntry extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServiceDataEntry', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceUuid', - protoName: 'serviceUuid', - subBuilder: Uuid.create) - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'data', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - + factory ServiceDataEntry() => create(); ServiceDataEntry._() : super(); - factory ServiceDataEntry({ - Uuid? serviceUuid, - $core.List<$core.int>? data, - }) { - final _result = create(); - if (serviceUuid != null) { - _result.serviceUuid = serviceUuid; - } - if (data != null) { - _result.data = data; - } - return _result; - } - factory ServiceDataEntry.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ServiceDataEntry.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory ServiceDataEntry.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServiceDataEntry.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServiceDataEntry', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'serviceUuid', protoName: 'serviceUuid', subBuilder: Uuid.create) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'data', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') ServiceDataEntry clone() => ServiceDataEntry()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ServiceDataEntry copyWith(void Function(ServiceDataEntry) updates) => - super.copyWith((message) => updates(message as ServiceDataEntry)) - as ServiceDataEntry; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ServiceDataEntry copyWith(void Function(ServiceDataEntry) updates) => super.copyWith((message) => updates(message as ServiceDataEntry)) as ServiceDataEntry; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServiceDataEntry create() => ServiceDataEntry._(); ServiceDataEntry createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ServiceDataEntry getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ServiceDataEntry getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ServiceDataEntry? _defaultInstance; @$pb.TagNumber(1) Uuid get serviceUuid => $_getN(0); @$pb.TagNumber(1) - set serviceUuid(Uuid v) { - setField(1, v); - } - + set serviceUuid(Uuid v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasServiceUuid() => $_has(0); @$pb.TagNumber(1) @@ -1868,10 +1114,7 @@ class ServiceDataEntry extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.List<$core.int> get data => $_getN(1); @$pb.TagNumber(2) - set data($core.List<$core.int> v) { - $_setBytes(1, v); - } - + set data($core.List<$core.int> v) { $_setBytes(1, v); } @$pb.TagNumber(2) $core.bool hasData() => $_has(1); @$pb.TagNumber(2) @@ -1879,59 +1122,35 @@ class ServiceDataEntry extends $pb.GeneratedMessage { } class ServicesWithCharacteristics extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServicesWithCharacteristics', - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'items', - $pb.PbFieldType.PM, - subBuilder: ServiceWithCharacteristics.create) - ..hasRequiredFields = false; - + factory ServicesWithCharacteristics() => create(); ServicesWithCharacteristics._() : super(); - factory ServicesWithCharacteristics({ - $core.Iterable? items, - }) { - final _result = create(); - if (items != null) { - _result.items.addAll(items); - } - return _result; - } - factory ServicesWithCharacteristics.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ServicesWithCharacteristics.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ServicesWithCharacteristics clone() => - ServicesWithCharacteristics()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ServicesWithCharacteristics copyWith( - void Function(ServicesWithCharacteristics) updates) => - super.copyWith( - (message) => updates(message as ServicesWithCharacteristics)) - as ServicesWithCharacteristics; // ignore: deprecated_member_use + factory ServicesWithCharacteristics.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServicesWithCharacteristics.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServicesWithCharacteristics', createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'items', $pb.PbFieldType.PM, subBuilder: ServiceWithCharacteristics.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ServicesWithCharacteristics clone() => ServicesWithCharacteristics()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ServicesWithCharacteristics copyWith(void Function(ServicesWithCharacteristics) updates) => super.copyWith((message) => updates(message as ServicesWithCharacteristics)) as ServicesWithCharacteristics; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') - static ServicesWithCharacteristics create() => - ServicesWithCharacteristics._(); + static ServicesWithCharacteristics create() => ServicesWithCharacteristics._(); ServicesWithCharacteristics createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ServicesWithCharacteristics getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ServicesWithCharacteristics getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ServicesWithCharacteristics? _defaultInstance; @$pb.TagNumber(1) @@ -1939,78 +1158,42 @@ class ServicesWithCharacteristics extends $pb.GeneratedMessage { } class ServiceWithCharacteristics extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServiceWithCharacteristics', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceId', - protoName: 'serviceId', - subBuilder: Uuid.create) - ..pc( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristics', - $pb.PbFieldType.PM, - subBuilder: Uuid.create) - ..hasRequiredFields = false; - + factory ServiceWithCharacteristics() => create(); ServiceWithCharacteristics._() : super(); - factory ServiceWithCharacteristics({ - Uuid? serviceId, - $core.Iterable? characteristics, - }) { - final _result = create(); - if (serviceId != null) { - _result.serviceId = serviceId; - } - if (characteristics != null) { - _result.characteristics.addAll(characteristics); - } - return _result; - } - factory ServiceWithCharacteristics.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ServiceWithCharacteristics.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ServiceWithCharacteristics clone() => - ServiceWithCharacteristics()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ServiceWithCharacteristics copyWith( - void Function(ServiceWithCharacteristics) updates) => - super.copyWith( - (message) => updates(message as ServiceWithCharacteristics)) - as ServiceWithCharacteristics; // ignore: deprecated_member_use + factory ServiceWithCharacteristics.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServiceWithCharacteristics.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServiceWithCharacteristics', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'serviceId', protoName: 'serviceId', subBuilder: Uuid.create) + ..pc(2, _omitFieldNames ? '' : 'characteristics', $pb.PbFieldType.PM, subBuilder: Uuid.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ServiceWithCharacteristics clone() => ServiceWithCharacteristics()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ServiceWithCharacteristics copyWith(void Function(ServiceWithCharacteristics) updates) => super.copyWith((message) => updates(message as ServiceWithCharacteristics)) as ServiceWithCharacteristics; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServiceWithCharacteristics create() => ServiceWithCharacteristics._(); ServiceWithCharacteristics createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static ServiceWithCharacteristics getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static ServiceWithCharacteristics getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ServiceWithCharacteristics? _defaultInstance; @$pb.TagNumber(1) Uuid get serviceId => $_getN(0); @$pb.TagNumber(1) - set serviceId(Uuid v) { - setField(1, v); - } - + set serviceId(Uuid v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasServiceId() => $_has(0); @$pb.TagNumber(1) @@ -2023,65 +1206,41 @@ class ServiceWithCharacteristics extends $pb.GeneratedMessage { } class DiscoverServicesRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DiscoverServicesRequest', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..hasRequiredFields = false; - + factory DiscoverServicesRequest() => create(); DiscoverServicesRequest._() : super(); - factory DiscoverServicesRequest({ - $core.String? deviceId, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - return _result; - } - factory DiscoverServicesRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DiscoverServicesRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DiscoverServicesRequest clone() => - DiscoverServicesRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DiscoverServicesRequest copyWith( - void Function(DiscoverServicesRequest) updates) => - super.copyWith((message) => updates(message as DiscoverServicesRequest)) - as DiscoverServicesRequest; // ignore: deprecated_member_use + factory DiscoverServicesRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DiscoverServicesRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DiscoverServicesRequest', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DiscoverServicesRequest clone() => DiscoverServicesRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DiscoverServicesRequest copyWith(void Function(DiscoverServicesRequest) updates) => super.copyWith((message) => updates(message as DiscoverServicesRequest)) as DiscoverServicesRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DiscoverServicesRequest create() => DiscoverServicesRequest._(); DiscoverServicesRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DiscoverServicesRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DiscoverServicesRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DiscoverServicesRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -2089,75 +1248,42 @@ class DiscoverServicesRequest extends $pb.GeneratedMessage { } class DiscoverServicesInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DiscoverServicesInfo', - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'deviceId', - protoName: 'deviceId') - ..pc( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'services', - $pb.PbFieldType.PM, - subBuilder: DiscoveredService.create) - ..hasRequiredFields = false; - + factory DiscoverServicesInfo() => create(); DiscoverServicesInfo._() : super(); - factory DiscoverServicesInfo({ - $core.String? deviceId, - $core.Iterable? services, - }) { - final _result = create(); - if (deviceId != null) { - _result.deviceId = deviceId; - } - if (services != null) { - _result.services.addAll(services); - } - return _result; - } - factory DiscoverServicesInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DiscoverServicesInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DiscoverServicesInfo clone() => - DiscoverServicesInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DiscoverServicesInfo copyWith(void Function(DiscoverServicesInfo) updates) => - super.copyWith((message) => updates(message as DiscoverServicesInfo)) - as DiscoverServicesInfo; // ignore: deprecated_member_use + factory DiscoverServicesInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DiscoverServicesInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DiscoverServicesInfo', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'deviceId', protoName: 'deviceId') + ..pc(2, _omitFieldNames ? '' : 'services', $pb.PbFieldType.PM, subBuilder: DiscoveredService.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DiscoverServicesInfo clone() => DiscoverServicesInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DiscoverServicesInfo copyWith(void Function(DiscoverServicesInfo) updates) => super.copyWith((message) => updates(message as DiscoverServicesInfo)) as DiscoverServicesInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DiscoverServicesInfo create() => DiscoverServicesInfo._(); DiscoverServicesInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DiscoverServicesInfo getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DiscoverServicesInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DiscoverServicesInfo? _defaultInstance; @$pb.TagNumber(1) $core.String get deviceId => $_getSZ(0); @$pb.TagNumber(1) - set deviceId($core.String v) { - $_setString(0, v); - } - + set deviceId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDeviceId() => $_has(0); @$pb.TagNumber(1) @@ -2168,99 +1294,44 @@ class DiscoverServicesInfo extends $pb.GeneratedMessage { } class DiscoveredService extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DiscoveredService', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceUuid', - protoName: 'serviceUuid', - subBuilder: Uuid.create) - ..pc( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristicUuids', - $pb.PbFieldType.PM, - protoName: 'characteristicUuids', - subBuilder: Uuid.create) - ..pc( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'includedServices', - $pb.PbFieldType.PM, - protoName: 'includedServices', - subBuilder: DiscoveredService.create) - ..pc( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristics', - $pb.PbFieldType.PM, - subBuilder: DiscoveredCharacteristic.create) - ..hasRequiredFields = false; - + factory DiscoveredService() => create(); DiscoveredService._() : super(); - factory DiscoveredService({ - Uuid? serviceUuid, - $core.Iterable? characteristicUuids, - $core.Iterable? includedServices, - $core.Iterable? characteristics, - }) { - final _result = create(); - if (serviceUuid != null) { - _result.serviceUuid = serviceUuid; - } - if (characteristicUuids != null) { - _result.characteristicUuids.addAll(characteristicUuids); - } - if (includedServices != null) { - _result.includedServices.addAll(includedServices); - } - if (characteristics != null) { - _result.characteristics.addAll(characteristics); - } - return _result; - } - factory DiscoveredService.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DiscoveredService.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory DiscoveredService.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DiscoveredService.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DiscoveredService', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'serviceUuid', protoName: 'serviceUuid', subBuilder: Uuid.create) + ..pc(2, _omitFieldNames ? '' : 'characteristicUuids', $pb.PbFieldType.PM, protoName: 'characteristicUuids', subBuilder: Uuid.create) + ..pc(3, _omitFieldNames ? '' : 'includedServices', $pb.PbFieldType.PM, protoName: 'includedServices', subBuilder: DiscoveredService.create) + ..pc(4, _omitFieldNames ? '' : 'characteristics', $pb.PbFieldType.PM, subBuilder: DiscoveredCharacteristic.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') DiscoveredService clone() => DiscoveredService()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DiscoveredService copyWith(void Function(DiscoveredService) updates) => - super.copyWith((message) => updates(message as DiscoveredService)) - as DiscoveredService; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DiscoveredService copyWith(void Function(DiscoveredService) updates) => super.copyWith((message) => updates(message as DiscoveredService)) as DiscoveredService; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DiscoveredService create() => DiscoveredService._(); DiscoveredService createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DiscoveredService getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DiscoveredService getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DiscoveredService? _defaultInstance; @$pb.TagNumber(1) Uuid get serviceUuid => $_getN(0); @$pb.TagNumber(1) - set serviceUuid(Uuid v) { - setField(1, v); - } - + set serviceUuid(Uuid v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasServiceUuid() => $_has(0); @$pb.TagNumber(1) @@ -2279,127 +1350,47 @@ class DiscoveredService extends $pb.GeneratedMessage { } class DiscoveredCharacteristic extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DiscoveredCharacteristic', - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'characteristicId', - protoName: 'characteristicId', - subBuilder: Uuid.create) - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serviceId', - protoName: 'serviceId', - subBuilder: Uuid.create) - ..aOB( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'isReadable', - protoName: 'isReadable') - ..aOB( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'isWritableWithResponse', - protoName: 'isWritableWithResponse') - ..aOB( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'isWritableWithoutResponse', - protoName: 'isWritableWithoutResponse') - ..aOB( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'isNotifiable', - protoName: 'isNotifiable') - ..aOB( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'isIndicatable', - protoName: 'isIndicatable') - ..hasRequiredFields = false; - + factory DiscoveredCharacteristic() => create(); DiscoveredCharacteristic._() : super(); - factory DiscoveredCharacteristic({ - Uuid? characteristicId, - Uuid? serviceId, - $core.bool? isReadable, - $core.bool? isWritableWithResponse, - $core.bool? isWritableWithoutResponse, - $core.bool? isNotifiable, - $core.bool? isIndicatable, - }) { - final _result = create(); - if (characteristicId != null) { - _result.characteristicId = characteristicId; - } - if (serviceId != null) { - _result.serviceId = serviceId; - } - if (isReadable != null) { - _result.isReadable = isReadable; - } - if (isWritableWithResponse != null) { - _result.isWritableWithResponse = isWritableWithResponse; - } - if (isWritableWithoutResponse != null) { - _result.isWritableWithoutResponse = isWritableWithoutResponse; - } - if (isNotifiable != null) { - _result.isNotifiable = isNotifiable; - } - if (isIndicatable != null) { - _result.isIndicatable = isIndicatable; - } - return _result; - } - factory DiscoveredCharacteristic.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DiscoveredCharacteristic.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DiscoveredCharacteristic clone() => - DiscoveredCharacteristic()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DiscoveredCharacteristic copyWith( - void Function(DiscoveredCharacteristic) updates) => - super.copyWith((message) => updates(message as DiscoveredCharacteristic)) - as DiscoveredCharacteristic; // ignore: deprecated_member_use + factory DiscoveredCharacteristic.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DiscoveredCharacteristic.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DiscoveredCharacteristic', createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'characteristicId', protoName: 'characteristicId', subBuilder: Uuid.create) + ..aOM(2, _omitFieldNames ? '' : 'serviceId', protoName: 'serviceId', subBuilder: Uuid.create) + ..aOB(3, _omitFieldNames ? '' : 'isReadable', protoName: 'isReadable') + ..aOB(4, _omitFieldNames ? '' : 'isWritableWithResponse', protoName: 'isWritableWithResponse') + ..aOB(5, _omitFieldNames ? '' : 'isWritableWithoutResponse', protoName: 'isWritableWithoutResponse') + ..aOB(6, _omitFieldNames ? '' : 'isNotifiable', protoName: 'isNotifiable') + ..aOB(7, _omitFieldNames ? '' : 'isIndicatable', protoName: 'isIndicatable') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DiscoveredCharacteristic clone() => DiscoveredCharacteristic()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DiscoveredCharacteristic copyWith(void Function(DiscoveredCharacteristic) updates) => super.copyWith((message) => updates(message as DiscoveredCharacteristic)) as DiscoveredCharacteristic; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DiscoveredCharacteristic create() => DiscoveredCharacteristic._(); DiscoveredCharacteristic createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static DiscoveredCharacteristic getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static DiscoveredCharacteristic getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DiscoveredCharacteristic? _defaultInstance; @$pb.TagNumber(1) Uuid get characteristicId => $_getN(0); @$pb.TagNumber(1) - set characteristicId(Uuid v) { - setField(1, v); - } - + set characteristicId(Uuid v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasCharacteristicId() => $_has(0); @$pb.TagNumber(1) @@ -2410,10 +1401,7 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { @$pb.TagNumber(2) Uuid get serviceId => $_getN(1); @$pb.TagNumber(2) - set serviceId(Uuid v) { - setField(2, v); - } - + set serviceId(Uuid v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasServiceId() => $_has(1); @$pb.TagNumber(2) @@ -2424,10 +1412,7 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.bool get isReadable => $_getBF(2); @$pb.TagNumber(3) - set isReadable($core.bool v) { - $_setBool(2, v); - } - + set isReadable($core.bool v) { $_setBool(2, v); } @$pb.TagNumber(3) $core.bool hasIsReadable() => $_has(2); @$pb.TagNumber(3) @@ -2436,10 +1421,7 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.bool get isWritableWithResponse => $_getBF(3); @$pb.TagNumber(4) - set isWritableWithResponse($core.bool v) { - $_setBool(3, v); - } - + set isWritableWithResponse($core.bool v) { $_setBool(3, v); } @$pb.TagNumber(4) $core.bool hasIsWritableWithResponse() => $_has(3); @$pb.TagNumber(4) @@ -2448,10 +1430,7 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.bool get isWritableWithoutResponse => $_getBF(4); @$pb.TagNumber(5) - set isWritableWithoutResponse($core.bool v) { - $_setBool(4, v); - } - + set isWritableWithoutResponse($core.bool v) { $_setBool(4, v); } @$pb.TagNumber(5) $core.bool hasIsWritableWithoutResponse() => $_has(4); @$pb.TagNumber(5) @@ -2460,10 +1439,7 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.bool get isNotifiable => $_getBF(5); @$pb.TagNumber(6) - set isNotifiable($core.bool v) { - $_setBool(5, v); - } - + set isNotifiable($core.bool v) { $_setBool(5, v); } @$pb.TagNumber(6) $core.bool hasIsNotifiable() => $_has(5); @$pb.TagNumber(6) @@ -2472,10 +1448,7 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { @$pb.TagNumber(7) $core.bool get isIndicatable => $_getBF(6); @$pb.TagNumber(7) - set isIndicatable($core.bool v) { - $_setBool(6, v); - } - + set isIndicatable($core.bool v) { $_setBool(6, v); } @$pb.TagNumber(7) $core.bool hasIsIndicatable() => $_has(6); @$pb.TagNumber(7) @@ -2483,62 +1456,41 @@ class DiscoveredCharacteristic extends $pb.GeneratedMessage { } class Uuid extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Uuid', - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'data', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - + factory Uuid() => create(); Uuid._() : super(); - factory Uuid({ - $core.List<$core.int>? data, - }) { - final _result = create(); - if (data != null) { - _result.data = data; - } - return _result; - } - factory Uuid.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Uuid.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory Uuid.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Uuid.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Uuid', createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'data', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Uuid clone() => Uuid()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Uuid copyWith(void Function(Uuid) updates) => - super.copyWith((message) => updates(message as Uuid)) - as Uuid; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Uuid copyWith(void Function(Uuid) updates) => super.copyWith((message) => updates(message as Uuid)) as Uuid; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Uuid create() => Uuid._(); Uuid createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Uuid getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Uuid getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Uuid? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.int> get data => $_getN(0); @$pb.TagNumber(1) - set data($core.List<$core.int> v) { - $_setBytes(0, v); - } - + set data($core.List<$core.int> v) { $_setBytes(0, v); } @$pb.TagNumber(1) $core.bool hasData() => $_has(0); @$pb.TagNumber(1) @@ -2546,72 +1498,42 @@ class Uuid extends $pb.GeneratedMessage { } class GenericFailure extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GenericFailure', - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'code', - $pb.PbFieldType.O3) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - + factory GenericFailure() => create(); GenericFailure._() : super(); - factory GenericFailure({ - $core.int? code, - $core.String? message, - }) { - final _result = create(); - if (code != null) { - _result.code = code; - } - if (message != null) { - _result.message = message; - } - return _result; - } - factory GenericFailure.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GenericFailure.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') + factory GenericFailure.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GenericFailure.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GenericFailure', createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.O3) + ..aOS(2, _omitFieldNames ? '' : 'message') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') GenericFailure clone() => GenericFailure()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GenericFailure copyWith(void Function(GenericFailure) updates) => - super.copyWith((message) => updates(message as GenericFailure)) - as GenericFailure; // ignore: deprecated_member_use + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GenericFailure copyWith(void Function(GenericFailure) updates) => super.copyWith((message) => updates(message as GenericFailure)) as GenericFailure; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static GenericFailure create() => GenericFailure._(); GenericFailure createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GenericFailure getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GenericFailure getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GenericFailure? _defaultInstance; @$pb.TagNumber(1) $core.int get code => $_getIZ(0); @$pb.TagNumber(1) - set code($core.int v) { - $_setSignedInt32(0, v); - } - + set code($core.int v) { $_setSignedInt32(0, v); } @$pb.TagNumber(1) $core.bool hasCode() => $_has(0); @$pb.TagNumber(1) @@ -2620,12 +1542,55 @@ class GenericFailure extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) - set message($core.String v) { - $_setString(1, v); - } - + set message($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasMessage() => $_has(1); @$pb.TagNumber(2) void clearMessage() => clearField(2); } + +class IsConnectable extends $pb.GeneratedMessage { + factory IsConnectable() => create(); + IsConnectable._() : super(); + factory IsConnectable.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory IsConnectable.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'IsConnectable', createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + IsConnectable clone() => IsConnectable()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + IsConnectable copyWith(void Function(IsConnectable) updates) => super.copyWith((message) => updates(message as IsConnectable)) as IsConnectable; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static IsConnectable create() => IsConnectable._(); + IsConnectable createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static IsConnectable getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static IsConnectable? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get code => $_getIZ(0); + @$pb.TagNumber(1) + set code($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(1) + void clearCode() => clearField(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/reactive_ble_mobile/lib/src/generated/bledata.pbenum.dart b/packages/reactive_ble_mobile/lib/src/generated/bledata.pbenum.dart new file mode 100644 index 00000000..213ad0f8 --- /dev/null +++ b/packages/reactive_ble_mobile/lib/src/generated/bledata.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: bledata.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/packages/reactive_ble_mobile/lib/src/generated/bledata.pbjson.dart b/packages/reactive_ble_mobile/lib/src/generated/bledata.pbjson.dart new file mode 100644 index 00000000..a0c0134c --- /dev/null +++ b/packages/reactive_ble_mobile/lib/src/generated/bledata.pbjson.dart @@ -0,0 +1,447 @@ +// +// Generated code. Do not modify. +// source: bledata.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use scanForDevicesRequestDescriptor instead') +const ScanForDevicesRequest$json = { + '1': 'ScanForDevicesRequest', + '2': [ + {'1': 'serviceUuids', '3': 1, '4': 3, '5': 11, '6': '.Uuid', '10': 'serviceUuids'}, + {'1': 'scanMode', '3': 2, '4': 1, '5': 5, '10': 'scanMode'}, + {'1': 'requireLocationServicesEnabled', '3': 3, '4': 1, '5': 8, '10': 'requireLocationServicesEnabled'}, + ], +}; + +/// Descriptor for `ScanForDevicesRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List scanForDevicesRequestDescriptor = $convert.base64Decode( + 'ChVTY2FuRm9yRGV2aWNlc1JlcXVlc3QSKQoMc2VydmljZVV1aWRzGAEgAygLMgUuVXVpZFIMc2' + 'VydmljZVV1aWRzEhoKCHNjYW5Nb2RlGAIgASgFUghzY2FuTW9kZRJGCh5yZXF1aXJlTG9jYXRp' + 'b25TZXJ2aWNlc0VuYWJsZWQYAyABKAhSHnJlcXVpcmVMb2NhdGlvblNlcnZpY2VzRW5hYmxlZA' + '=='); + +@$core.Deprecated('Use deviceScanInfoDescriptor instead') +const DeviceScanInfo$json = { + '1': 'DeviceScanInfo', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'failure', '3': 3, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + {'1': 'serviceData', '3': 4, '4': 3, '5': 11, '6': '.ServiceDataEntry', '10': 'serviceData'}, + {'1': 'manufacturerData', '3': 6, '4': 1, '5': 12, '10': 'manufacturerData'}, + {'1': 'serviceUuids', '3': 7, '4': 3, '5': 11, '6': '.Uuid', '10': 'serviceUuids'}, + {'1': 'rssi', '3': 5, '4': 1, '5': 5, '10': 'rssi'}, + {'1': 'isConnectable', '3': 8, '4': 1, '5': 11, '6': '.IsConnectable', '10': 'isConnectable'}, + ], +}; + +/// Descriptor for `DeviceScanInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deviceScanInfoDescriptor = $convert.base64Decode( + 'Cg5EZXZpY2VTY2FuSW5mbxIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbmFtZRIpCg' + 'dmYWlsdXJlGAMgASgLMg8uR2VuZXJpY0ZhaWx1cmVSB2ZhaWx1cmUSMwoLc2VydmljZURhdGEY' + 'BCADKAsyES5TZXJ2aWNlRGF0YUVudHJ5UgtzZXJ2aWNlRGF0YRIqChBtYW51ZmFjdHVyZXJEYX' + 'RhGAYgASgMUhBtYW51ZmFjdHVyZXJEYXRhEikKDHNlcnZpY2VVdWlkcxgHIAMoCzIFLlV1aWRS' + 'DHNlcnZpY2VVdWlkcxISCgRyc3NpGAUgASgFUgRyc3NpEjQKDWlzQ29ubmVjdGFibGUYCCABKA' + 'syDi5Jc0Nvbm5lY3RhYmxlUg1pc0Nvbm5lY3RhYmxl'); + +@$core.Deprecated('Use connectToDeviceRequestDescriptor instead') +const ConnectToDeviceRequest$json = { + '1': 'ConnectToDeviceRequest', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'servicesWithCharacteristicsToDiscover', '3': 2, '4': 1, '5': 11, '6': '.ServicesWithCharacteristics', '10': 'servicesWithCharacteristicsToDiscover'}, + {'1': 'timeoutInMs', '3': 3, '4': 1, '5': 5, '10': 'timeoutInMs'}, + ], +}; + +/// Descriptor for `ConnectToDeviceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List connectToDeviceRequestDescriptor = $convert.base64Decode( + 'ChZDb25uZWN0VG9EZXZpY2VSZXF1ZXN0EhoKCGRldmljZUlkGAEgASgJUghkZXZpY2VJZBJyCi' + 'VzZXJ2aWNlc1dpdGhDaGFyYWN0ZXJpc3RpY3NUb0Rpc2NvdmVyGAIgASgLMhwuU2VydmljZXNX' + 'aXRoQ2hhcmFjdGVyaXN0aWNzUiVzZXJ2aWNlc1dpdGhDaGFyYWN0ZXJpc3RpY3NUb0Rpc2Nvdm' + 'VyEiAKC3RpbWVvdXRJbk1zGAMgASgFUgt0aW1lb3V0SW5Ncw=='); + +@$core.Deprecated('Use deviceInfoDescriptor instead') +const DeviceInfo$json = { + '1': 'DeviceInfo', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'connectionState', '3': 2, '4': 1, '5': 5, '10': 'connectionState'}, + {'1': 'failure', '3': 3, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + ], +}; + +/// Descriptor for `DeviceInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deviceInfoDescriptor = $convert.base64Decode( + 'CgpEZXZpY2VJbmZvEg4KAmlkGAEgASgJUgJpZBIoCg9jb25uZWN0aW9uU3RhdGUYAiABKAVSD2' + 'Nvbm5lY3Rpb25TdGF0ZRIpCgdmYWlsdXJlGAMgASgLMg8uR2VuZXJpY0ZhaWx1cmVSB2ZhaWx1' + 'cmU='); + +@$core.Deprecated('Use disconnectFromDeviceRequestDescriptor instead') +const DisconnectFromDeviceRequest$json = { + '1': 'DisconnectFromDeviceRequest', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + ], +}; + +/// Descriptor for `DisconnectFromDeviceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List disconnectFromDeviceRequestDescriptor = $convert.base64Decode( + 'ChtEaXNjb25uZWN0RnJvbURldmljZVJlcXVlc3QSGgoIZGV2aWNlSWQYASABKAlSCGRldmljZU' + 'lk'); + +@$core.Deprecated('Use clearGattCacheRequestDescriptor instead') +const ClearGattCacheRequest$json = { + '1': 'ClearGattCacheRequest', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + ], +}; + +/// Descriptor for `ClearGattCacheRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List clearGattCacheRequestDescriptor = $convert.base64Decode( + 'ChVDbGVhckdhdHRDYWNoZVJlcXVlc3QSGgoIZGV2aWNlSWQYASABKAlSCGRldmljZUlk'); + +@$core.Deprecated('Use clearGattCacheInfoDescriptor instead') +const ClearGattCacheInfo$json = { + '1': 'ClearGattCacheInfo', + '2': [ + {'1': 'failure', '3': 1, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + ], +}; + +/// Descriptor for `ClearGattCacheInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List clearGattCacheInfoDescriptor = $convert.base64Decode( + 'ChJDbGVhckdhdHRDYWNoZUluZm8SKQoHZmFpbHVyZRgBIAEoCzIPLkdlbmVyaWNGYWlsdXJlUg' + 'dmYWlsdXJl'); + +@$core.Deprecated('Use notifyCharacteristicRequestDescriptor instead') +const NotifyCharacteristicRequest$json = { + '1': 'NotifyCharacteristicRequest', + '2': [ + {'1': 'characteristic', '3': 1, '4': 1, '5': 11, '6': '.CharacteristicAddress', '10': 'characteristic'}, + ], +}; + +/// Descriptor for `NotifyCharacteristicRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List notifyCharacteristicRequestDescriptor = $convert.base64Decode( + 'ChtOb3RpZnlDaGFyYWN0ZXJpc3RpY1JlcXVlc3QSPgoOY2hhcmFjdGVyaXN0aWMYASABKAsyFi' + '5DaGFyYWN0ZXJpc3RpY0FkZHJlc3NSDmNoYXJhY3RlcmlzdGlj'); + +@$core.Deprecated('Use notifyNoMoreCharacteristicRequestDescriptor instead') +const NotifyNoMoreCharacteristicRequest$json = { + '1': 'NotifyNoMoreCharacteristicRequest', + '2': [ + {'1': 'characteristic', '3': 1, '4': 1, '5': 11, '6': '.CharacteristicAddress', '10': 'characteristic'}, + ], +}; + +/// Descriptor for `NotifyNoMoreCharacteristicRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List notifyNoMoreCharacteristicRequestDescriptor = $convert.base64Decode( + 'CiFOb3RpZnlOb01vcmVDaGFyYWN0ZXJpc3RpY1JlcXVlc3QSPgoOY2hhcmFjdGVyaXN0aWMYAS' + 'ABKAsyFi5DaGFyYWN0ZXJpc3RpY0FkZHJlc3NSDmNoYXJhY3RlcmlzdGlj'); + +@$core.Deprecated('Use readCharacteristicRequestDescriptor instead') +const ReadCharacteristicRequest$json = { + '1': 'ReadCharacteristicRequest', + '2': [ + {'1': 'characteristic', '3': 1, '4': 1, '5': 11, '6': '.CharacteristicAddress', '10': 'characteristic'}, + ], +}; + +/// Descriptor for `ReadCharacteristicRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List readCharacteristicRequestDescriptor = $convert.base64Decode( + 'ChlSZWFkQ2hhcmFjdGVyaXN0aWNSZXF1ZXN0Ej4KDmNoYXJhY3RlcmlzdGljGAEgASgLMhYuQ2' + 'hhcmFjdGVyaXN0aWNBZGRyZXNzUg5jaGFyYWN0ZXJpc3RpYw=='); + +@$core.Deprecated('Use characteristicValueInfoDescriptor instead') +const CharacteristicValueInfo$json = { + '1': 'CharacteristicValueInfo', + '2': [ + {'1': 'characteristic', '3': 1, '4': 1, '5': 11, '6': '.CharacteristicAddress', '10': 'characteristic'}, + {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + {'1': 'failure', '3': 3, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + ], +}; + +/// Descriptor for `CharacteristicValueInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List characteristicValueInfoDescriptor = $convert.base64Decode( + 'ChdDaGFyYWN0ZXJpc3RpY1ZhbHVlSW5mbxI+Cg5jaGFyYWN0ZXJpc3RpYxgBIAEoCzIWLkNoYX' + 'JhY3RlcmlzdGljQWRkcmVzc1IOY2hhcmFjdGVyaXN0aWMSFAoFdmFsdWUYAiABKAxSBXZhbHVl' + 'EikKB2ZhaWx1cmUYAyABKAsyDy5HZW5lcmljRmFpbHVyZVIHZmFpbHVyZQ=='); + +@$core.Deprecated('Use writeCharacteristicRequestDescriptor instead') +const WriteCharacteristicRequest$json = { + '1': 'WriteCharacteristicRequest', + '2': [ + {'1': 'characteristic', '3': 1, '4': 1, '5': 11, '6': '.CharacteristicAddress', '10': 'characteristic'}, + {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + ], +}; + +/// Descriptor for `WriteCharacteristicRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List writeCharacteristicRequestDescriptor = $convert.base64Decode( + 'ChpXcml0ZUNoYXJhY3RlcmlzdGljUmVxdWVzdBI+Cg5jaGFyYWN0ZXJpc3RpYxgBIAEoCzIWLk' + 'NoYXJhY3RlcmlzdGljQWRkcmVzc1IOY2hhcmFjdGVyaXN0aWMSFAoFdmFsdWUYAiABKAxSBXZh' + 'bHVl'); + +@$core.Deprecated('Use writeCharacteristicInfoDescriptor instead') +const WriteCharacteristicInfo$json = { + '1': 'WriteCharacteristicInfo', + '2': [ + {'1': 'characteristic', '3': 1, '4': 1, '5': 11, '6': '.CharacteristicAddress', '10': 'characteristic'}, + {'1': 'failure', '3': 3, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + ], +}; + +/// Descriptor for `WriteCharacteristicInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List writeCharacteristicInfoDescriptor = $convert.base64Decode( + 'ChdXcml0ZUNoYXJhY3RlcmlzdGljSW5mbxI+Cg5jaGFyYWN0ZXJpc3RpYxgBIAEoCzIWLkNoYX' + 'JhY3RlcmlzdGljQWRkcmVzc1IOY2hhcmFjdGVyaXN0aWMSKQoHZmFpbHVyZRgDIAEoCzIPLkdl' + 'bmVyaWNGYWlsdXJlUgdmYWlsdXJl'); + +@$core.Deprecated('Use negotiateMtuRequestDescriptor instead') +const NegotiateMtuRequest$json = { + '1': 'NegotiateMtuRequest', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'mtuSize', '3': 2, '4': 1, '5': 5, '10': 'mtuSize'}, + ], +}; + +/// Descriptor for `NegotiateMtuRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List negotiateMtuRequestDescriptor = $convert.base64Decode( + 'ChNOZWdvdGlhdGVNdHVSZXF1ZXN0EhoKCGRldmljZUlkGAEgASgJUghkZXZpY2VJZBIYCgdtdH' + 'VTaXplGAIgASgFUgdtdHVTaXpl'); + +@$core.Deprecated('Use negotiateMtuInfoDescriptor instead') +const NegotiateMtuInfo$json = { + '1': 'NegotiateMtuInfo', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'mtuSize', '3': 2, '4': 1, '5': 5, '10': 'mtuSize'}, + {'1': 'failure', '3': 3, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + ], +}; + +/// Descriptor for `NegotiateMtuInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List negotiateMtuInfoDescriptor = $convert.base64Decode( + 'ChBOZWdvdGlhdGVNdHVJbmZvEhoKCGRldmljZUlkGAEgASgJUghkZXZpY2VJZBIYCgdtdHVTaX' + 'plGAIgASgFUgdtdHVTaXplEikKB2ZhaWx1cmUYAyABKAsyDy5HZW5lcmljRmFpbHVyZVIHZmFp' + 'bHVyZQ=='); + +@$core.Deprecated('Use bleStatusInfoDescriptor instead') +const BleStatusInfo$json = { + '1': 'BleStatusInfo', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 5, '10': 'status'}, + ], +}; + +/// Descriptor for `BleStatusInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List bleStatusInfoDescriptor = $convert.base64Decode( + 'Cg1CbGVTdGF0dXNJbmZvEhYKBnN0YXR1cxgBIAEoBVIGc3RhdHVz'); + +@$core.Deprecated('Use changeConnectionPriorityRequestDescriptor instead') +const ChangeConnectionPriorityRequest$json = { + '1': 'ChangeConnectionPriorityRequest', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'priority', '3': 2, '4': 1, '5': 5, '10': 'priority'}, + ], +}; + +/// Descriptor for `ChangeConnectionPriorityRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List changeConnectionPriorityRequestDescriptor = $convert.base64Decode( + 'Ch9DaGFuZ2VDb25uZWN0aW9uUHJpb3JpdHlSZXF1ZXN0EhoKCGRldmljZUlkGAEgASgJUghkZX' + 'ZpY2VJZBIaCghwcmlvcml0eRgCIAEoBVIIcHJpb3JpdHk='); + +@$core.Deprecated('Use changeConnectionPriorityInfoDescriptor instead') +const ChangeConnectionPriorityInfo$json = { + '1': 'ChangeConnectionPriorityInfo', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'failure', '3': 2, '4': 1, '5': 11, '6': '.GenericFailure', '10': 'failure'}, + ], +}; + +/// Descriptor for `ChangeConnectionPriorityInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List changeConnectionPriorityInfoDescriptor = $convert.base64Decode( + 'ChxDaGFuZ2VDb25uZWN0aW9uUHJpb3JpdHlJbmZvEhoKCGRldmljZUlkGAEgASgJUghkZXZpY2' + 'VJZBIpCgdmYWlsdXJlGAIgASgLMg8uR2VuZXJpY0ZhaWx1cmVSB2ZhaWx1cmU='); + +@$core.Deprecated('Use characteristicAddressDescriptor instead') +const CharacteristicAddress$json = { + '1': 'CharacteristicAddress', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'serviceUuid', '3': 2, '4': 1, '5': 11, '6': '.Uuid', '10': 'serviceUuid'}, + {'1': 'characteristicUuid', '3': 3, '4': 1, '5': 11, '6': '.Uuid', '10': 'characteristicUuid'}, + ], +}; + +/// Descriptor for `CharacteristicAddress`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List characteristicAddressDescriptor = $convert.base64Decode( + 'ChVDaGFyYWN0ZXJpc3RpY0FkZHJlc3MSGgoIZGV2aWNlSWQYASABKAlSCGRldmljZUlkEicKC3' + 'NlcnZpY2VVdWlkGAIgASgLMgUuVXVpZFILc2VydmljZVV1aWQSNQoSY2hhcmFjdGVyaXN0aWNV' + 'dWlkGAMgASgLMgUuVXVpZFISY2hhcmFjdGVyaXN0aWNVdWlk'); + +@$core.Deprecated('Use serviceDataEntryDescriptor instead') +const ServiceDataEntry$json = { + '1': 'ServiceDataEntry', + '2': [ + {'1': 'serviceUuid', '3': 1, '4': 1, '5': 11, '6': '.Uuid', '10': 'serviceUuid'}, + {'1': 'data', '3': 2, '4': 1, '5': 12, '10': 'data'}, + ], +}; + +/// Descriptor for `ServiceDataEntry`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List serviceDataEntryDescriptor = $convert.base64Decode( + 'ChBTZXJ2aWNlRGF0YUVudHJ5EicKC3NlcnZpY2VVdWlkGAEgASgLMgUuVXVpZFILc2VydmljZV' + 'V1aWQSEgoEZGF0YRgCIAEoDFIEZGF0YQ=='); + +@$core.Deprecated('Use servicesWithCharacteristicsDescriptor instead') +const ServicesWithCharacteristics$json = { + '1': 'ServicesWithCharacteristics', + '2': [ + {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.ServiceWithCharacteristics', '10': 'items'}, + ], +}; + +/// Descriptor for `ServicesWithCharacteristics`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List servicesWithCharacteristicsDescriptor = $convert.base64Decode( + 'ChtTZXJ2aWNlc1dpdGhDaGFyYWN0ZXJpc3RpY3MSMQoFaXRlbXMYASADKAsyGy5TZXJ2aWNlV2' + 'l0aENoYXJhY3RlcmlzdGljc1IFaXRlbXM='); + +@$core.Deprecated('Use serviceWithCharacteristicsDescriptor instead') +const ServiceWithCharacteristics$json = { + '1': 'ServiceWithCharacteristics', + '2': [ + {'1': 'serviceId', '3': 1, '4': 1, '5': 11, '6': '.Uuid', '10': 'serviceId'}, + {'1': 'characteristics', '3': 2, '4': 3, '5': 11, '6': '.Uuid', '10': 'characteristics'}, + ], +}; + +/// Descriptor for `ServiceWithCharacteristics`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List serviceWithCharacteristicsDescriptor = $convert.base64Decode( + 'ChpTZXJ2aWNlV2l0aENoYXJhY3RlcmlzdGljcxIjCglzZXJ2aWNlSWQYASABKAsyBS5VdWlkUg' + 'lzZXJ2aWNlSWQSLwoPY2hhcmFjdGVyaXN0aWNzGAIgAygLMgUuVXVpZFIPY2hhcmFjdGVyaXN0' + 'aWNz'); + +@$core.Deprecated('Use discoverServicesRequestDescriptor instead') +const DiscoverServicesRequest$json = { + '1': 'DiscoverServicesRequest', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + ], +}; + +/// Descriptor for `DiscoverServicesRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List discoverServicesRequestDescriptor = $convert.base64Decode( + 'ChdEaXNjb3ZlclNlcnZpY2VzUmVxdWVzdBIaCghkZXZpY2VJZBgBIAEoCVIIZGV2aWNlSWQ='); + +@$core.Deprecated('Use discoverServicesInfoDescriptor instead') +const DiscoverServicesInfo$json = { + '1': 'DiscoverServicesInfo', + '2': [ + {'1': 'deviceId', '3': 1, '4': 1, '5': 9, '10': 'deviceId'}, + {'1': 'services', '3': 2, '4': 3, '5': 11, '6': '.DiscoveredService', '10': 'services'}, + ], +}; + +/// Descriptor for `DiscoverServicesInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List discoverServicesInfoDescriptor = $convert.base64Decode( + 'ChREaXNjb3ZlclNlcnZpY2VzSW5mbxIaCghkZXZpY2VJZBgBIAEoCVIIZGV2aWNlSWQSLgoIc2' + 'VydmljZXMYAiADKAsyEi5EaXNjb3ZlcmVkU2VydmljZVIIc2VydmljZXM='); + +@$core.Deprecated('Use discoveredServiceDescriptor instead') +const DiscoveredService$json = { + '1': 'DiscoveredService', + '2': [ + {'1': 'serviceUuid', '3': 1, '4': 1, '5': 11, '6': '.Uuid', '10': 'serviceUuid'}, + {'1': 'characteristicUuids', '3': 2, '4': 3, '5': 11, '6': '.Uuid', '10': 'characteristicUuids'}, + {'1': 'includedServices', '3': 3, '4': 3, '5': 11, '6': '.DiscoveredService', '10': 'includedServices'}, + {'1': 'characteristics', '3': 4, '4': 3, '5': 11, '6': '.DiscoveredCharacteristic', '10': 'characteristics'}, + ], +}; + +/// Descriptor for `DiscoveredService`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List discoveredServiceDescriptor = $convert.base64Decode( + 'ChFEaXNjb3ZlcmVkU2VydmljZRInCgtzZXJ2aWNlVXVpZBgBIAEoCzIFLlV1aWRSC3NlcnZpY2' + 'VVdWlkEjcKE2NoYXJhY3RlcmlzdGljVXVpZHMYAiADKAsyBS5VdWlkUhNjaGFyYWN0ZXJpc3Rp' + 'Y1V1aWRzEj4KEGluY2x1ZGVkU2VydmljZXMYAyADKAsyEi5EaXNjb3ZlcmVkU2VydmljZVIQaW' + '5jbHVkZWRTZXJ2aWNlcxJDCg9jaGFyYWN0ZXJpc3RpY3MYBCADKAsyGS5EaXNjb3ZlcmVkQ2hh' + 'cmFjdGVyaXN0aWNSD2NoYXJhY3RlcmlzdGljcw=='); + +@$core.Deprecated('Use discoveredCharacteristicDescriptor instead') +const DiscoveredCharacteristic$json = { + '1': 'DiscoveredCharacteristic', + '2': [ + {'1': 'characteristicId', '3': 1, '4': 1, '5': 11, '6': '.Uuid', '10': 'characteristicId'}, + {'1': 'serviceId', '3': 2, '4': 1, '5': 11, '6': '.Uuid', '10': 'serviceId'}, + {'1': 'isReadable', '3': 3, '4': 1, '5': 8, '10': 'isReadable'}, + {'1': 'isWritableWithResponse', '3': 4, '4': 1, '5': 8, '10': 'isWritableWithResponse'}, + {'1': 'isWritableWithoutResponse', '3': 5, '4': 1, '5': 8, '10': 'isWritableWithoutResponse'}, + {'1': 'isNotifiable', '3': 6, '4': 1, '5': 8, '10': 'isNotifiable'}, + {'1': 'isIndicatable', '3': 7, '4': 1, '5': 8, '10': 'isIndicatable'}, + ], +}; + +/// Descriptor for `DiscoveredCharacteristic`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List discoveredCharacteristicDescriptor = $convert.base64Decode( + 'ChhEaXNjb3ZlcmVkQ2hhcmFjdGVyaXN0aWMSMQoQY2hhcmFjdGVyaXN0aWNJZBgBIAEoCzIFLl' + 'V1aWRSEGNoYXJhY3RlcmlzdGljSWQSIwoJc2VydmljZUlkGAIgASgLMgUuVXVpZFIJc2Vydmlj' + 'ZUlkEh4KCmlzUmVhZGFibGUYAyABKAhSCmlzUmVhZGFibGUSNgoWaXNXcml0YWJsZVdpdGhSZX' + 'Nwb25zZRgEIAEoCFIWaXNXcml0YWJsZVdpdGhSZXNwb25zZRI8Chlpc1dyaXRhYmxlV2l0aG91' + 'dFJlc3BvbnNlGAUgASgIUhlpc1dyaXRhYmxlV2l0aG91dFJlc3BvbnNlEiIKDGlzTm90aWZpYW' + 'JsZRgGIAEoCFIMaXNOb3RpZmlhYmxlEiQKDWlzSW5kaWNhdGFibGUYByABKAhSDWlzSW5kaWNh' + 'dGFibGU='); + +@$core.Deprecated('Use uuidDescriptor instead') +const Uuid$json = { + '1': 'Uuid', + '2': [ + {'1': 'data', '3': 1, '4': 1, '5': 12, '10': 'data'}, + ], +}; + +/// Descriptor for `Uuid`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List uuidDescriptor = $convert.base64Decode( + 'CgRVdWlkEhIKBGRhdGEYASABKAxSBGRhdGE='); + +@$core.Deprecated('Use genericFailureDescriptor instead') +const GenericFailure$json = { + '1': 'GenericFailure', + '2': [ + {'1': 'code', '3': 1, '4': 1, '5': 5, '10': 'code'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `GenericFailure`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List genericFailureDescriptor = $convert.base64Decode( + 'Cg5HZW5lcmljRmFpbHVyZRISCgRjb2RlGAEgASgFUgRjb2RlEhgKB21lc3NhZ2UYAiABKAlSB2' + '1lc3NhZ2U='); + +@$core.Deprecated('Use isConnectableDescriptor instead') +const IsConnectable$json = { + '1': 'IsConnectable', + '2': [ + {'1': 'code', '3': 1, '4': 1, '5': 5, '10': 'code'}, + ], +}; + +/// Descriptor for `IsConnectable`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List isConnectableDescriptor = $convert.base64Decode( + 'Cg1Jc0Nvbm5lY3RhYmxlEhIKBGNvZGUYASABKAVSBGNvZGU='); + diff --git a/packages/reactive_ble_mobile/lib/src/generated/bledata.pbserver.dart b/packages/reactive_ble_mobile/lib/src/generated/bledata.pbserver.dart new file mode 100644 index 00000000..9765515c --- /dev/null +++ b/packages/reactive_ble_mobile/lib/src/generated/bledata.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: bledata.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'bledata.pb.dart'; + diff --git a/packages/reactive_ble_mobile/protos/bledata.proto b/packages/reactive_ble_mobile/protos/bledata.proto index e156cbd8..c9aae8f4 100644 --- a/packages/reactive_ble_mobile/protos/bledata.proto +++ b/packages/reactive_ble_mobile/protos/bledata.proto @@ -16,6 +16,7 @@ message DeviceScanInfo { bytes manufacturerData = 6; repeated Uuid serviceUuids = 7; int32 rssi = 5; + IsConnectable isConnectable = 8; } message ConnectToDeviceRequest { @@ -149,3 +150,7 @@ message GenericFailure { int32 code = 1; string message = 2; } + +message IsConnectable { + int32 code = 1; +} diff --git a/packages/reactive_ble_mobile/pubspec.lock b/packages/reactive_ble_mobile/pubspec.lock index 8b4bdf52..e62179cb 100644 --- a/packages/reactive_ble_mobile/pubspec.lock +++ b/packages/reactive_ble_mobile/pubspec.lock @@ -5,170 +5,194 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" source: hosted - version: "50.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.13.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + url: "https://pub.dev" source: hosted - version: "8.4.2" + version: "8.6.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -183,156 +207,178 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" functional_data: dependency: transitive description: name: functional_data - url: "https://pub.dartlang.org" + sha256: aefdec4365452283b2a7cf420a3169654d51d3e9553069a22d76680d7a9d7c3d + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.8.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" mockito: dependency: "direct dev" description: name: mockito - url: "https://pub.dartlang.org" + sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" protobuf: dependency: "direct main" description: name: protobuf - url: "https://pub.dartlang.org" + sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" + url: "https://pub.dev" source: hosted version: "2.1.0" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.3" reactive_ble_platform_interface: dependency: "direct main" description: @@ -344,16 +390,18 @@ packages: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -363,100 +411,114 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.5.1" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=2.0.0" diff --git a/packages/reactive_ble_mobile/pubspec.yaml b/packages/reactive_ble_mobile/pubspec.yaml index 6b8370de..975abd7c 100644 --- a/packages/reactive_ble_mobile/pubspec.yaml +++ b/packages/reactive_ble_mobile/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: protobuf: ^2.0.0 reactive_ble_platform_interface: ^5.0.3 dev_dependencies: - build_runner: ^2.1.2 + build_runner: ^2.3.3 flutter_test: sdk: flutter mockito: ^5.0.14 diff --git a/packages/reactive_ble_mobile/test/converter/protobuf_converter_test.dart b/packages/reactive_ble_mobile/test/converter/protobuf_converter_test.dart index 0e0310c6..cda827bf 100644 --- a/packages/reactive_ble_mobile/test/converter/protobuf_converter_test.dart +++ b/packages/reactive_ble_mobile/test/converter/protobuf_converter_test.dart @@ -12,6 +12,7 @@ void main() { group("decoding ${pb.DeviceScanInfo}", () { const id = 'id'; const name = 'name'; + const connectable = Connectable.available; late pb.ServiceDataEntry serviceDataEntry1; late pb.ServiceDataEntry serviceDataEntry2; @@ -35,6 +36,7 @@ void main() { message = pb.DeviceScanInfo() ..id = id ..name = name + ..isConnectable = (pb.IsConnectable()..code = 2) ..serviceData.add(serviceDataEntry1) ..serviceData.add(serviceDataEntry2) ..serviceUuids.add(serviceUuid1) @@ -58,6 +60,16 @@ void main() { name); }); + test('converts connectable', () { + expect( + scanresult.result.iif( + success: (d) => d.connectable, + failure: (_) => throw Exception(), + ), + connectable, + ); + }); + test('converts service data', () { expect( scanresult.result.iif( @@ -492,19 +504,23 @@ void main() { final discoveredInternalServices = pb.DiscoveredService() ..serviceUuid = internalServiceUuid - ..characteristics.add(pb.DiscoveredCharacteristic( - characteristicId: internalCharUuid, - serviceId: internalServiceUuid, - isReadable: true)) + ..characteristics.add( + pb.DiscoveredCharacteristic() + ..characteristicId = internalCharUuid + ..serviceId = internalServiceUuid + ..isReadable = true, + ) ..characteristicUuids.add(internalCharUuid); final discoveredService = pb.DiscoveredService() ..serviceUuid = serviceUuid ..characteristicUuids.add(charUuid) - ..characteristics.add(pb.DiscoveredCharacteristic( - characteristicId: charUuid, - serviceId: serviceUuid, - isWritableWithResponse: true)) + ..characteristics.add( + pb.DiscoveredCharacteristic() + ..characteristicId = charUuid + ..serviceId = serviceUuid + ..isWritableWithResponse = true, + ) ..includedServices.add(discoveredInternalServices); message = pb.DiscoverServicesInfo() diff --git a/packages/reactive_ble_mobile/test/reactive_ble_platform_test.dart b/packages/reactive_ble_mobile/test/reactive_ble_platform_test.dart index 6931b926..d9a20f98 100644 --- a/packages/reactive_ble_mobile/test/reactive_ble_platform_test.dart +++ b/packages/reactive_ble_mobile/test/reactive_ble_platform_test.dart @@ -486,6 +486,7 @@ void main() { id: '123', name: 'Testdevice', rssi: -40, + connectable: Connectable.unknown, serviceData: const {}, serviceUuids: const [], manufacturerData: Uint8List.fromList([1]), diff --git a/packages/reactive_ble_mobile/test/reactive_ble_platform_test.mocks.dart b/packages/reactive_ble_mobile/test/reactive_ble_platform_test.mocks.dart index 8d0561e4..034d0794 100644 --- a/packages/reactive_ble_mobile/test/reactive_ble_platform_test.mocks.dart +++ b/packages/reactive_ble_mobile/test/reactive_ble_platform_test.mocks.dart @@ -1,12 +1,12 @@ -// Mocks generated by Mockito 5.0.16 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in reactive_ble_mobile/test/reactive_ble_platform_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i9; -import 'package:flutter/src/services/binding.dart' as _i5; +import 'package:flutter/src/services/binary_messenger.dart' as _i5; import 'package:flutter/src/services/message_codec.dart' as _i4; -import 'package:flutter/src/services/message_codecs.dart' as _i10; import 'package:flutter/src/services/platform_channel.dart' as _i8; import 'package:mockito/mockito.dart' as _i1; import 'package:reactive_ble_mobile/src/converter/args_to_protubuf_converter.dart' @@ -17,6 +17,7 @@ import 'package:reactive_ble_mobile/src/generated/bledata.pb.dart' as _i2; import 'package:reactive_ble_platform_interface/reactive_ble_platform_interface.dart' as _i3; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -25,60 +26,214 @@ import 'package:reactive_ble_platform_interface/reactive_ble_platform_interface. // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeConnectToDeviceRequest_0 extends _i1.Fake - implements _i2.ConnectToDeviceRequest {} +class _FakeConnectToDeviceRequest_0 extends _i1.SmartFake + implements _i2.ConnectToDeviceRequest { + _FakeConnectToDeviceRequest_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDisconnectFromDeviceRequest_1 extends _i1.Fake - implements _i2.DisconnectFromDeviceRequest {} +class _FakeDisconnectFromDeviceRequest_1 extends _i1.SmartFake + implements _i2.DisconnectFromDeviceRequest { + _FakeDisconnectFromDeviceRequest_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeReadCharacteristicRequest_2 extends _i1.Fake - implements _i2.ReadCharacteristicRequest {} +class _FakeReadCharacteristicRequest_2 extends _i1.SmartFake + implements _i2.ReadCharacteristicRequest { + _FakeReadCharacteristicRequest_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWriteCharacteristicRequest_3 extends _i1.Fake - implements _i2.WriteCharacteristicRequest {} +class _FakeWriteCharacteristicRequest_3 extends _i1.SmartFake + implements _i2.WriteCharacteristicRequest { + _FakeWriteCharacteristicRequest_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeNotifyCharacteristicRequest_4 extends _i1.Fake - implements _i2.NotifyCharacteristicRequest {} +class _FakeNotifyCharacteristicRequest_4 extends _i1.SmartFake + implements _i2.NotifyCharacteristicRequest { + _FakeNotifyCharacteristicRequest_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeNotifyNoMoreCharacteristicRequest_5 extends _i1.Fake - implements _i2.NotifyNoMoreCharacteristicRequest {} +class _FakeNotifyNoMoreCharacteristicRequest_5 extends _i1.SmartFake + implements _i2.NotifyNoMoreCharacteristicRequest { + _FakeNotifyNoMoreCharacteristicRequest_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeNegotiateMtuRequest_6 extends _i1.Fake - implements _i2.NegotiateMtuRequest {} +class _FakeNegotiateMtuRequest_6 extends _i1.SmartFake + implements _i2.NegotiateMtuRequest { + _FakeNegotiateMtuRequest_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChangeConnectionPriorityRequest_7 extends _i1.Fake - implements _i2.ChangeConnectionPriorityRequest {} +class _FakeChangeConnectionPriorityRequest_7 extends _i1.SmartFake + implements _i2.ChangeConnectionPriorityRequest { + _FakeChangeConnectionPriorityRequest_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeScanForDevicesRequest_8 extends _i1.Fake - implements _i2.ScanForDevicesRequest {} +class _FakeScanForDevicesRequest_8 extends _i1.SmartFake + implements _i2.ScanForDevicesRequest { + _FakeScanForDevicesRequest_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClearGattCacheRequest_9 extends _i1.Fake - implements _i2.ClearGattCacheRequest {} +class _FakeClearGattCacheRequest_9 extends _i1.SmartFake + implements _i2.ClearGattCacheRequest { + _FakeClearGattCacheRequest_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDiscoverServicesRequest_10 extends _i1.Fake - implements _i2.DiscoverServicesRequest {} +class _FakeDiscoverServicesRequest_10 extends _i1.SmartFake + implements _i2.DiscoverServicesRequest { + _FakeDiscoverServicesRequest_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeScanResult_11 extends _i1.Fake implements _i3.ScanResult {} +class _FakeScanResult_11 extends _i1.SmartFake implements _i3.ScanResult { + _FakeScanResult_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConnectionStateUpdate_12 extends _i1.Fake - implements _i3.ConnectionStateUpdate {} +class _FakeConnectionStateUpdate_12 extends _i1.SmartFake + implements _i3.ConnectionStateUpdate { + _FakeConnectionStateUpdate_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResult_13 extends _i1.Fake - implements _i3.Result {} +class _FakeResult_13 extends _i1.SmartFake + implements _i3.Result { + _FakeResult_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCharacteristicValue_14 extends _i1.Fake - implements _i3.CharacteristicValue {} +class _FakeCharacteristicValue_14 extends _i1.SmartFake + implements _i3.CharacteristicValue { + _FakeCharacteristicValue_14( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWriteCharacteristicInfo_15 extends _i1.Fake - implements _i3.WriteCharacteristicInfo {} +class _FakeWriteCharacteristicInfo_15 extends _i1.SmartFake + implements _i3.WriteCharacteristicInfo { + _FakeWriteCharacteristicInfo_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConnectionPriorityInfo_16 extends _i1.Fake - implements _i3.ConnectionPriorityInfo {} +class _FakeConnectionPriorityInfo_16 extends _i1.SmartFake + implements _i3.ConnectionPriorityInfo { + _FakeConnectionPriorityInfo_16( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMethodCodec_17 extends _i1.Fake implements _i4.MethodCodec {} +class _FakeMethodCodec_17 extends _i1.SmartFake implements _i4.MethodCodec { + _FakeMethodCodec_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeBinaryMessenger_18 extends _i1.Fake implements _i5.BinaryMessenger {} +class _FakeBinaryMessenger_18 extends _i1.SmartFake + implements _i5.BinaryMessenger { + _FakeBinaryMessenger_18( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ArgsToProtobufConverter]. /// @@ -91,98 +246,226 @@ class MockArgsToProtobufConverter extends _i1.Mock @override _i2.ConnectToDeviceRequest createConnectToDeviceArgs( - String? id, - Map<_i3.Uuid, List<_i3.Uuid>>? servicesWithCharacteristicsToDiscover, - Duration? connectionTimeout) => + String? id, + Map<_i3.Uuid, List<_i3.Uuid>>? servicesWithCharacteristicsToDiscover, + Duration? connectionTimeout, + ) => (super.noSuchMethod( - Invocation.method(#createConnectToDeviceArgs, [ - id, - servicesWithCharacteristicsToDiscover, - connectionTimeout - ]), - returnValue: _FakeConnectToDeviceRequest_0()) - as _i2.ConnectToDeviceRequest); + Invocation.method( + #createConnectToDeviceArgs, + [ + id, + servicesWithCharacteristicsToDiscover, + connectionTimeout, + ], + ), + returnValue: _FakeConnectToDeviceRequest_0( + this, + Invocation.method( + #createConnectToDeviceArgs, + [ + id, + servicesWithCharacteristicsToDiscover, + connectionTimeout, + ], + ), + ), + ) as _i2.ConnectToDeviceRequest); @override _i2.DisconnectFromDeviceRequest createDisconnectDeviceArgs( String? deviceId) => (super.noSuchMethod( - Invocation.method(#createDisconnectDeviceArgs, [deviceId]), - returnValue: _FakeDisconnectFromDeviceRequest_1()) - as _i2.DisconnectFromDeviceRequest); + Invocation.method( + #createDisconnectDeviceArgs, + [deviceId], + ), + returnValue: _FakeDisconnectFromDeviceRequest_1( + this, + Invocation.method( + #createDisconnectDeviceArgs, + [deviceId], + ), + ), + ) as _i2.DisconnectFromDeviceRequest); @override _i2.ReadCharacteristicRequest createReadCharacteristicRequest( _i3.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method(#createReadCharacteristicRequest, [characteristic]), - returnValue: - _FakeReadCharacteristicRequest_2()) as _i2 - .ReadCharacteristicRequest); + Invocation.method( + #createReadCharacteristicRequest, + [characteristic], + ), + returnValue: _FakeReadCharacteristicRequest_2( + this, + Invocation.method( + #createReadCharacteristicRequest, + [characteristic], + ), + ), + ) as _i2.ReadCharacteristicRequest); @override _i2.WriteCharacteristicRequest createWriteCharacteristicRequest( - _i3.QualifiedCharacteristic? characteristic, List? value) => + _i3.QualifiedCharacteristic? characteristic, + List? value, + ) => (super.noSuchMethod( - Invocation.method( - #createWriteCharacteristicRequest, [characteristic, value]), - returnValue: _FakeWriteCharacteristicRequest_3()) - as _i2.WriteCharacteristicRequest); + Invocation.method( + #createWriteCharacteristicRequest, + [ + characteristic, + value, + ], + ), + returnValue: _FakeWriteCharacteristicRequest_3( + this, + Invocation.method( + #createWriteCharacteristicRequest, + [ + characteristic, + value, + ], + ), + ), + ) as _i2.WriteCharacteristicRequest); @override _i2.NotifyCharacteristicRequest createNotifyCharacteristicRequest( _i3.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method( - #createNotifyCharacteristicRequest, [characteristic]), - returnValue: _FakeNotifyCharacteristicRequest_4()) - as _i2.NotifyCharacteristicRequest); + Invocation.method( + #createNotifyCharacteristicRequest, + [characteristic], + ), + returnValue: _FakeNotifyCharacteristicRequest_4( + this, + Invocation.method( + #createNotifyCharacteristicRequest, + [characteristic], + ), + ), + ) as _i2.NotifyCharacteristicRequest); @override _i2.NotifyNoMoreCharacteristicRequest createNotifyNoMoreCharacteristicRequest( _i3.QualifiedCharacteristic? characteristic) => (super.noSuchMethod( - Invocation.method( - #createNotifyNoMoreCharacteristicRequest, [characteristic]), - returnValue: _FakeNotifyNoMoreCharacteristicRequest_5()) - as _i2.NotifyNoMoreCharacteristicRequest); + Invocation.method( + #createNotifyNoMoreCharacteristicRequest, + [characteristic], + ), + returnValue: _FakeNotifyNoMoreCharacteristicRequest_5( + this, + Invocation.method( + #createNotifyNoMoreCharacteristicRequest, + [characteristic], + ), + ), + ) as _i2.NotifyNoMoreCharacteristicRequest); @override _i2.NegotiateMtuRequest createNegotiateMtuRequest( - String? deviceId, int? mtu) => + String? deviceId, + int? mtu, + ) => (super.noSuchMethod( - Invocation.method(#createNegotiateMtuRequest, [deviceId, mtu]), - returnValue: _FakeNegotiateMtuRequest_6()) - as _i2.NegotiateMtuRequest); + Invocation.method( + #createNegotiateMtuRequest, + [ + deviceId, + mtu, + ], + ), + returnValue: _FakeNegotiateMtuRequest_6( + this, + Invocation.method( + #createNegotiateMtuRequest, + [ + deviceId, + mtu, + ], + ), + ), + ) as _i2.NegotiateMtuRequest); @override _i2.ChangeConnectionPriorityRequest createChangeConnectionPrioRequest( - String? deviceId, _i3.ConnectionPriority? priority) => + String? deviceId, + _i3.ConnectionPriority? priority, + ) => (super.noSuchMethod( - Invocation.method( - #createChangeConnectionPrioRequest, [deviceId, priority]), - returnValue: _FakeChangeConnectionPriorityRequest_7()) - as _i2.ChangeConnectionPriorityRequest); + Invocation.method( + #createChangeConnectionPrioRequest, + [ + deviceId, + priority, + ], + ), + returnValue: _FakeChangeConnectionPriorityRequest_7( + this, + Invocation.method( + #createChangeConnectionPrioRequest, + [ + deviceId, + priority, + ], + ), + ), + ) as _i2.ChangeConnectionPriorityRequest); @override - _i2.ScanForDevicesRequest createScanForDevicesRequest( - {List<_i3.Uuid>? withServices, - _i3.ScanMode? scanMode, - bool? requireLocationServicesEnabled}) => + _i2.ScanForDevicesRequest createScanForDevicesRequest({ + required List<_i3.Uuid>? withServices, + required _i3.ScanMode? scanMode, + required bool? requireLocationServicesEnabled, + }) => (super.noSuchMethod( - Invocation.method(#createScanForDevicesRequest, [], { - #withServices: withServices, - #scanMode: scanMode, - #requireLocationServicesEnabled: requireLocationServicesEnabled - }), - returnValue: _FakeScanForDevicesRequest_8()) - as _i2.ScanForDevicesRequest); + Invocation.method( + #createScanForDevicesRequest, + [], + { + #withServices: withServices, + #scanMode: scanMode, + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + returnValue: _FakeScanForDevicesRequest_8( + this, + Invocation.method( + #createScanForDevicesRequest, + [], + { + #withServices: withServices, + #scanMode: scanMode, + #requireLocationServicesEnabled: requireLocationServicesEnabled, + }, + ), + ), + ) as _i2.ScanForDevicesRequest); @override _i2.ClearGattCacheRequest createClearGattCacheRequest(String? deviceId) => (super.noSuchMethod( - Invocation.method(#createClearGattCacheRequest, [deviceId]), - returnValue: _FakeClearGattCacheRequest_9()) - as _i2.ClearGattCacheRequest); + Invocation.method( + #createClearGattCacheRequest, + [deviceId], + ), + returnValue: _FakeClearGattCacheRequest_9( + this, + Invocation.method( + #createClearGattCacheRequest, + [deviceId], + ), + ), + ) as _i2.ClearGattCacheRequest); @override _i2.DiscoverServicesRequest createDiscoverServicesRequest(String? deviceId) => (super.noSuchMethod( - Invocation.method(#createDiscoverServicesRequest, [deviceId]), - returnValue: _FakeDiscoverServicesRequest_10()) - as _i2.DiscoverServicesRequest); - @override - String toString() => super.toString(); + Invocation.method( + #createDiscoverServicesRequest, + [deviceId], + ), + returnValue: _FakeDiscoverServicesRequest_10( + this, + Invocation.method( + #createDiscoverServicesRequest, + [deviceId], + ), + ), + ) as _i2.DiscoverServicesRequest); } /// A class which mocks [ProtobufConverter]. @@ -194,53 +477,121 @@ class MockProtobufConverter extends _i1.Mock implements _i7.ProtobufConverter { } @override - _i3.BleStatus bleStatusFrom(List? data) => - (super.noSuchMethod(Invocation.method(#bleStatusFrom, [data]), - returnValue: _i3.BleStatus.unknown) as _i3.BleStatus); + _i3.BleStatus bleStatusFrom(List? data) => (super.noSuchMethod( + Invocation.method( + #bleStatusFrom, + [data], + ), + returnValue: _i3.BleStatus.unknown, + ) as _i3.BleStatus); @override - _i3.ScanResult scanResultFrom(List? data) => - (super.noSuchMethod(Invocation.method(#scanResultFrom, [data]), - returnValue: _FakeScanResult_11()) as _i3.ScanResult); + _i3.ScanResult scanResultFrom(List? data) => (super.noSuchMethod( + Invocation.method( + #scanResultFrom, + [data], + ), + returnValue: _FakeScanResult_11( + this, + Invocation.method( + #scanResultFrom, + [data], + ), + ), + ) as _i3.ScanResult); @override _i3.ConnectionStateUpdate connectionStateUpdateFrom(List? data) => - (super.noSuchMethod(Invocation.method(#connectionStateUpdateFrom, [data]), - returnValue: _FakeConnectionStateUpdate_12()) - as _i3.ConnectionStateUpdate); + (super.noSuchMethod( + Invocation.method( + #connectionStateUpdateFrom, + [data], + ), + returnValue: _FakeConnectionStateUpdate_12( + this, + Invocation.method( + #connectionStateUpdateFrom, + [data], + ), + ), + ) as _i3.ConnectionStateUpdate); @override _i3.Result<_i3.Unit, _i3.GenericFailure<_i3.ClearGattCacheError>?> clearGattCacheResultFrom(List? data) => (super.noSuchMethod( - Invocation.method(#clearGattCacheResultFrom, [data]), - returnValue: _FakeResult_13<_i3.Unit, - _i3.GenericFailure<_i3.ClearGattCacheError>?>()) as _i3 - .Result<_i3.Unit, _i3.GenericFailure<_i3.ClearGattCacheError>?>); + Invocation.method( + #clearGattCacheResultFrom, + [data], + ), + returnValue: _FakeResult_13<_i3.Unit, + _i3.GenericFailure<_i3.ClearGattCacheError>?>( + this, + Invocation.method( + #clearGattCacheResultFrom, + [data], + ), + ), + ) as _i3 + .Result<_i3.Unit, _i3.GenericFailure<_i3.ClearGattCacheError>?>); @override _i3.CharacteristicValue characteristicValueFrom(List? data) => - (super.noSuchMethod(Invocation.method(#characteristicValueFrom, [data]), - returnValue: _FakeCharacteristicValue_14()) - as _i3.CharacteristicValue); + (super.noSuchMethod( + Invocation.method( + #characteristicValueFrom, + [data], + ), + returnValue: _FakeCharacteristicValue_14( + this, + Invocation.method( + #characteristicValueFrom, + [data], + ), + ), + ) as _i3.CharacteristicValue); @override _i3.WriteCharacteristicInfo writeCharacteristicInfoFrom(List? data) => (super.noSuchMethod( - Invocation.method(#writeCharacteristicInfoFrom, [data]), - returnValue: _FakeWriteCharacteristicInfo_15()) - as _i3.WriteCharacteristicInfo); + Invocation.method( + #writeCharacteristicInfoFrom, + [data], + ), + returnValue: _FakeWriteCharacteristicInfo_15( + this, + Invocation.method( + #writeCharacteristicInfoFrom, + [data], + ), + ), + ) as _i3.WriteCharacteristicInfo); @override _i3.ConnectionPriorityInfo connectionPriorityInfoFrom(List? data) => (super.noSuchMethod( - Invocation.method(#connectionPriorityInfoFrom, [data]), - returnValue: _FakeConnectionPriorityInfo_16()) - as _i3.ConnectionPriorityInfo); + Invocation.method( + #connectionPriorityInfoFrom, + [data], + ), + returnValue: _FakeConnectionPriorityInfo_16( + this, + Invocation.method( + #connectionPriorityInfoFrom, + [data], + ), + ), + ) as _i3.ConnectionPriorityInfo); @override - int mtuSizeFrom(List? data) => (super - .noSuchMethod(Invocation.method(#mtuSizeFrom, [data]), returnValue: 0) - as int); + int mtuSizeFrom(List? data) => (super.noSuchMethod( + Invocation.method( + #mtuSizeFrom, + [data], + ), + returnValue: 0, + ) as int); @override List<_i3.DiscoveredService> discoveredServicesFrom(List? data) => - (super.noSuchMethod(Invocation.method(#discoveredServicesFrom, [data]), - returnValue: <_i3.DiscoveredService>[]) - as List<_i3.DiscoveredService>); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #discoveredServicesFrom, + [data], + ), + returnValue: <_i3.DiscoveredService>[], + ) as List<_i3.DiscoveredService>); } /// A class which mocks [MethodChannel]. @@ -252,36 +603,79 @@ class MockMethodChannel extends _i1.Mock implements _i8.MethodChannel { } @override - String get name => - (super.noSuchMethod(Invocation.getter(#name), returnValue: '') as String); + String get name => (super.noSuchMethod( + Invocation.getter(#name), + returnValue: '', + ) as String); @override - _i4.MethodCodec get codec => (super.noSuchMethod(Invocation.getter(#codec), - returnValue: _FakeMethodCodec_17()) as _i4.MethodCodec); + _i4.MethodCodec get codec => (super.noSuchMethod( + Invocation.getter(#codec), + returnValue: _FakeMethodCodec_17( + this, + Invocation.getter(#codec), + ), + ) as _i4.MethodCodec); @override - _i5.BinaryMessenger get binaryMessenger => - (super.noSuchMethod(Invocation.getter(#binaryMessenger), - returnValue: _FakeBinaryMessenger_18()) as _i5.BinaryMessenger); + _i5.BinaryMessenger get binaryMessenger => (super.noSuchMethod( + Invocation.getter(#binaryMessenger), + returnValue: _FakeBinaryMessenger_18( + this, + Invocation.getter(#binaryMessenger), + ), + ) as _i5.BinaryMessenger); @override - _i9.Future invokeMethod(String? method, [dynamic arguments]) => - (super.noSuchMethod(Invocation.method(#invokeMethod, [method, arguments]), - returnValue: Future.value()) as _i9.Future); + _i9.Future invokeMethod( + String? method, [ + dynamic arguments, + ]) => + (super.noSuchMethod( + Invocation.method( + #invokeMethod, + [ + method, + arguments, + ], + ), + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i9.Future?> invokeListMethod(String? method, - [dynamic arguments]) => + _i9.Future?> invokeListMethod( + String? method, [ + dynamic arguments, + ]) => (super.noSuchMethod( - Invocation.method(#invokeListMethod, [method, arguments]), - returnValue: Future?>.value()) as _i9.Future?>); + Invocation.method( + #invokeListMethod, + [ + method, + arguments, + ], + ), + returnValue: _i9.Future?>.value(), + ) as _i9.Future?>); @override - _i9.Future?> invokeMapMethod(String? method, - [dynamic arguments]) => + _i9.Future?> invokeMapMethod( + String? method, [ + dynamic arguments, + ]) => (super.noSuchMethod( - Invocation.method(#invokeMapMethod, [method, arguments]), - returnValue: Future?>.value()) as _i9.Future?>); + Invocation.method( + #invokeMapMethod, + [ + method, + arguments, + ], + ), + returnValue: _i9.Future?>.value(), + ) as _i9.Future?>); @override void setMethodCallHandler( - _i9.Future Function(_i10.MethodCall)? handler) => - super.noSuchMethod(Invocation.method(#setMethodCallHandler, [handler]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + _i9.Future Function(_i4.MethodCall)? handler) => + super.noSuchMethod( + Invocation.method( + #setMethodCallHandler, + [handler], + ), + returnValueForMissingStub: null, + ); } diff --git a/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.dart b/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.dart index 601ead43..5a438a16 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.dart @@ -15,6 +15,7 @@ part 'discovered_device.g.dart'; @FunctionalData() class ScanResult extends $ScanResult { final Result?> result; + const ScanResult({required this.result}); @override @@ -41,12 +42,15 @@ class DiscoveredDevice extends $DiscoveredDevice { final int rssi; + final Connectable connectable; + const DiscoveredDevice({ required this.id, required this.name, required this.serviceData, required this.manufacturerData, required this.rssi, + required this.connectable, required this.serviceUuids, }); } @@ -68,3 +72,6 @@ enum ConnectionStatus { /// Failure type of device discovery. enum ScanFailure { unknown } + +/// Shows if the device is ready to be connected to from a discovery perspective +enum Connectable { unknown, unavailable, available } diff --git a/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.g.dart b/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.g.dart index cdc600ab..9d0dbce8 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.g.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/discovered_device.g.dart @@ -71,6 +71,7 @@ abstract class $DiscoveredDevice { List get serviceUuids; Uint8List get manufacturerData; int get rssi; + Connectable get connectable; DiscoveredDevice copyWith({ String? id, @@ -79,6 +80,7 @@ abstract class $DiscoveredDevice { List? serviceUuids, Uint8List? manufacturerData, int? rssi, + Connectable? connectable, }) => DiscoveredDevice( id: id ?? this.id, @@ -87,6 +89,7 @@ abstract class $DiscoveredDevice { serviceUuids: serviceUuids ?? this.serviceUuids, manufacturerData: manufacturerData ?? this.manufacturerData, rssi: rssi ?? this.rssi, + connectable: connectable ?? this.connectable, ); DiscoveredDevice copyUsing( @@ -98,6 +101,7 @@ abstract class $DiscoveredDevice { this.serviceUuids, this.manufacturerData, this.rssi, + this.connectable, ); mutator(change); return DiscoveredDevice( @@ -107,12 +111,13 @@ abstract class $DiscoveredDevice { serviceUuids: change.serviceUuids, manufacturerData: change.manufacturerData, rssi: change.rssi, + connectable: change.connectable, ); } @override String toString() => - "DiscoveredDevice(id: $id, name: $name, serviceData: $serviceData, serviceUuids: $serviceUuids, manufacturerData: $manufacturerData, rssi: $rssi)"; + "DiscoveredDevice(id: $id, name: $name, serviceData: $serviceData, serviceUuids: $serviceUuids, manufacturerData: $manufacturerData, rssi: $rssi, connectable: $connectable)"; @override // ignore: avoid_equals_and_hash_code_on_mutable_classes @@ -125,7 +130,8 @@ abstract class $DiscoveredDevice { const DeepCollectionEquality().equals(serviceUuids, other.serviceUuids) && const DeepCollectionEquality() .equals(manufacturerData, other.manufacturerData) && - rssi == other.rssi; + rssi == other.rssi && + connectable == other.connectable; @override // ignore: avoid_equals_and_hash_code_on_mutable_classes @@ -138,6 +144,7 @@ abstract class $DiscoveredDevice { result = 37 * result + const DeepCollectionEquality().hash(manufacturerData); result = 37 * result + rssi.hashCode; + result = 37 * result + connectable.hashCode; return result; } } @@ -150,6 +157,7 @@ class DiscoveredDevice$Change { this.serviceUuids, this.manufacturerData, this.rssi, + this.connectable, ); String id; @@ -158,6 +166,7 @@ class DiscoveredDevice$Change { List serviceUuids; Uint8List manufacturerData; int rssi; + Connectable connectable; } // ignore: avoid_classes_with_only_static_members @@ -194,4 +203,10 @@ class DiscoveredDevice$ { (rssiContainer) => rssiContainer.rssi, (rssiContainer, rssi) => rssiContainer.copyWith(rssi: rssi), ); + + static final connectable = Lens( + (connectableContainer) => connectableContainer.connectable, + (connectableContainer, connectable) => + connectableContainer.copyWith(connectable: connectable), + ); } diff --git a/packages/reactive_ble_platform_interface/pubspec.lock b/packages/reactive_ble_platform_interface/pubspec.lock index b50e3247..1969af6b 100644 --- a/packages/reactive_ble_platform_interface/pubspec.lock +++ b/packages/reactive_ble_platform_interface/pubspec.lock @@ -5,170 +5,194 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" source: hosted - version: "47.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "5.13.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "2.2.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + url: "https://pub.dev" source: hosted - version: "8.4.2" + version: "8.6.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -178,7 +202,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + url: "https://pub.dev" source: hosted version: "1.0.4" flutter_test: @@ -190,177 +215,202 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" functional_data: dependency: "direct main" description: name: functional_data - url: "https://pub.dartlang.org" + sha256: aefdec4365452283b2a7cf420a3169654d51d3e9553069a22d76680d7a9d7c3d + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" functional_data_generator: dependency: "direct dev" description: name: functional_data_generator - url: "https://pub.dartlang.org" + sha256: dc5df76840dd5951624648b8c56514b4c500dd5ba1cd00cfe5d61972feb3f3b5 + url: "https://pub.dev" source: hosted - version: "1.1.4" + version: "1.1.5" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.8.1" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + url: "https://pub.dev" source: hosted version: "1.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: "direct main" description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" mockito: dependency: "direct dev" description: name: mockito - url: "https://pub.dartlang.org" + sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" plugin_platform_interface: dependency: "direct main" description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.3" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -370,100 +420,114 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.5.1" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=2.0.0" diff --git a/packages/reactive_ble_platform_interface/pubspec.yaml b/packages/reactive_ble_platform_interface/pubspec.yaml index 77eb6fff..3d21026c 100644 --- a/packages/reactive_ble_platform_interface/pubspec.yaml +++ b/packages/reactive_ble_platform_interface/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: plugin_platform_interface: ^2.0.1 dev_dependencies: - build_runner: ^2.1.2 + build_runner: ^2.3.3 flutter_lints: ^1.0.3 flutter_test: sdk: flutter