Skip to content
Draft
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Protobuf: 1a37ebea1338949e9ac35a3f06e80b3f536eec8d
reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c
reactive_ble_mobile: 61f61f4ac1ca38455cdb35e043088360e229bc4d
SwiftProtobuf: 9c85136c6ba74b0a1b84279dbf0f6db8efb714e0

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d

COCOAPODS: 1.11.2
2 changes: 2 additions & 0 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -467,6 +468,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.signify.huereactivebleExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
40 changes: 20 additions & 20 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand All @@ -42,7 +42,7 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
build_config:
dependency: transitive
description:
Expand All @@ -56,7 +56,7 @@ packages:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
build_resolvers:
dependency: transitive
description:
Expand All @@ -70,7 +70,7 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.5"
build_runner_core:
dependency: transitive
description:
Expand All @@ -91,14 +91,14 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.2"
version: "8.1.3"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.1.0"
charcode:
dependency: transitive
description:
Expand All @@ -119,7 +119,7 @@ packages:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3"
version: "0.3.5"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -161,7 +161,7 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
dependency_validator:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -208,7 +208,7 @@ packages:
path: "../packages/flutter_reactive_ble"
relative: true
source: path
version: "5.0.1"
version: "5.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -241,7 +241,7 @@ packages:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -290,7 +290,7 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.3.0"
lints:
dependency: transitive
description:
Expand All @@ -311,7 +311,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.10"
meta:
dependency: transitive
description:
Expand All @@ -325,7 +325,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -360,7 +360,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -406,9 +406,9 @@ packages:
reactive_ble_platform_interface:
dependency: transitive
description:
name: reactive_ble_platform_interface
url: "https://pub.dartlang.org"
source: hosted
path: "../packages/reactive_ble_platform_interface"
relative: true
source: path
version: "5.0.2"
shelf:
dependency: transitive
Expand Down Expand Up @@ -484,7 +484,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.2"
timing:
dependency: transitive
description:
Expand All @@ -505,14 +505,14 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.0"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
web_socket_channel:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ packages:
- /**
scripts:
analyze: melos exec -- flutter analyze
generate: melos exec -c 1 -- flutter pub run build_runner build --delete-conflicting-outputs
format: melos exec -- flutter format .
get: melos exec -- flutter pub get
unittest:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ abstract class ConnectedDeviceOperation {
required List<int> value,
});

Future<void> writeDescriptorWithoutResponse(
QualifiedDescriptor descriptor, {
required List<int> value,
});

Stream<List<int>> subscribeToCharacteristic(
QualifiedCharacteristic characteristic,
Future<void> isDisconnected,
Expand Down Expand Up @@ -71,6 +76,13 @@ class ConnectedDeviceOperationImpl implements ConnectedDeviceOperation {
.writeCharacteristicWithoutResponse(characteristic, value)
.then((info) => info.result.dematerialize());

@override
Future<void> writeDescriptorWithoutResponse(QualifiedDescriptor descriptor,
{required List<int> value}) =>
_blePlatform
.writeDescriptorWithoutResponse(descriptor, value)
.then((info) => info.result.dematerialize());

@override
Stream<List<int>> subscribeToCharacteristic(
QualifiedCharacteristic characteristic,
Expand Down
11 changes: 11 additions & 0 deletions packages/flutter_reactive_ble/lib/src/reactive_ble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@ class FlutterReactiveBle {
);
}

Future<void> writeDescriptor(
QualifiedDescriptor descriptor, {
required List<int> value,
}) async {
await initialize();
return _connectedDeviceOperator.writeDescriptorWithoutResponse(
descriptor,
value: value,
);
}

/// Request a specific MTU for a connected device.
///
/// Returns the actual MTU negotiated.
Expand Down
38 changes: 19 additions & 19 deletions packages/flutter_reactive_ble/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
build_config:
dependency: transitive
description:
Expand All @@ -56,7 +56,7 @@ packages:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
build_resolvers:
dependency: transitive
description:
Expand All @@ -70,14 +70,14 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.5"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
version: "7.2.2"
built_collection:
dependency: transitive
description:
Expand All @@ -91,7 +91,7 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.2"
version: "8.1.3"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -119,7 +119,7 @@ packages:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3"
version: "0.3.5"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -161,7 +161,7 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -227,7 +227,7 @@ packages:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -269,7 +269,7 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.3.0"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -304,7 +304,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
mockito:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -339,7 +339,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -371,16 +371,16 @@ packages:
reactive_ble_mobile:
dependency: "direct main"
description:
name: reactive_ble_mobile
url: "https://pub.dartlang.org"
source: hosted
path: "../reactive_ble_mobile"
relative: true
source: path
version: "5.0.2"
reactive_ble_platform_interface:
dependency: "direct main"
description:
name: reactive_ble_platform_interface
url: "https://pub.dartlang.org"
source: hosted
path: "../reactive_ble_platform_interface"
relative: true
source: path
version: "5.0.2"
shelf:
dependency: transitive
Expand Down Expand Up @@ -484,7 +484,7 @@ packages:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
web_socket_channel:
dependency: transitive
description:
Expand All @@ -500,5 +500,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.0.0"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Mocks generated by Mockito 5.0.14 from annotations
// Mocks generated by Mockito 5.0.15 from annotations
// in flutter_reactive_ble/test/connected_device_operation_test.dart.
// Do not manually edit this file.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Mocks generated by Mockito 5.0.14 from annotations
// Mocks generated by Mockito 5.0.15 from annotations
// in flutter_reactive_ble/test/device_connector_test.dart.
// Do not manually edit this file.

Expand Down
Loading