Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.3.4

* added methods to handle wearable factories
* remove wearable factory
* get all registered wearable factories
* clear all registered wearable factories

## 2.3.3

* renamed TauRing to OpenRing
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.3.2"
version: "2.3.4"
path:
dependency: transitive
description:
Expand Down
19 changes: 19 additions & 0 deletions lib/open_earable_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,25 @@ class WearableManager {
_wearableFactories.add(factory);
}

/// Removes a wearable factory from the manager.
/// This can be used to stop supporting certain types of wearables.
/// Example usage:
/// ```dart
/// WearableManager().removeWearableFactory(MyCustomWearableFactory());
/// ```
void removeWearableFactory(WearableFactory factory) {
_wearableFactories.remove(factory);
}

/// Clears all registered wearable factories from the manager.
/// This will remove support for all wearables that rely on those factories.
void clearWearableFactories() {
_wearableFactories.clear();
}

/// Returns an unmodifiable list of the currently registered wearable factories.
List<WearableFactory> get wearableFactories => List.unmodifiable(_wearableFactories);

/// Starts scanning for BLE devices.
/// If `checkAndRequestPermissions` is true, it will check and request the necessary
/// permissions before starting the scan.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: open_earable_flutter
description: This package provides functionality for interacting with OpenEarable devices. Control LED colors, control audio, and access raw sensor data.
version: 2.3.3
version: 2.3.4
repository: https://github.com/OpenEarable/open_earable_flutter/tree/main

platforms:
Expand Down