ReactiveBlePlatform class abstract
The interface that implementations of reactive_ble
must implement.
- Inheritance
-
- Object
- PlatformInterface
- ReactiveBlePlatform
Constructors
Properties
-
bleStatusStream
→ Stream<
BleStatus> -
Stream that provides status updates regarding the host device BLE sub system.
no setter
-
charValueUpdateStream
→ Stream<
CharacteristicValue> -
Stream that provides value updates about the characteristics that are read
or subscribed to.
no setter
-
connectionUpdateStream
→ Stream<
ConnectionStateUpdate> -
Listen to this stream to get connection updates for all the connected BLE
devices.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scanStream
→ Stream<
ScanResult> -
Stream providing ble scan results.
no setter
Methods
-
clearGattCache(
String deviceId) → Future< Result< Unit, GenericFailure< >ClearGattCacheError> ?> - Clears GATT attribute cache on Android using undocumented API. This method should not be implemented for other platforms.
-
connectToDevice(
String id, Map< Uuid, List< ? servicesWithCharacteristicsToDiscover, Duration? connectionTimeout) → Stream<Uuid> >void> -
Connects to a specific device and the connection remains
established
until the stream iscancelled
or the connection is closed by the peripheral. -
deinitialize(
) → Future< void> - De-initializes the ble plugin platform specific counter parts.
-
disconnectDevice(
String deviceId) → Future< void> - Operation that disconnects the host with the peripheral.
-
discoverServices(
String deviceId) → Future< List< DiscoveredService> > - Performs service discovery on the peripheral and returns the discovered services.
-
getDiscoverServices(
String deviceId) → Future< List< DiscoveredService> > -
initialize(
) → Future< void> - Initializes the ble plugin platform specific counter parts.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readCharacteristic(
CharacteristicInstance characteristic) → Stream< void> - Performs service discovery on the peripheral and returns the discovered services.
-
readRssi(
String deviceId) → Future< int> -
requestConnectionPriority(
String deviceId, ConnectionPriority priority) → Future< ConnectionPriorityInfo> - Requests for a connection parameter update on the connected device.
-
requestMtuSize(
String deviceId, int? mtu) → Future< int> - Requests a specific MTU for a connected device.
-
scanForDevices(
{required List< Uuid> withServices, required ScanMode scanMode, required bool requireLocationServicesEnabled}) → Stream<void> - Stream that handles triggers scanning for Ble devices.
-
stopSubscribingToNotifications(
CharacteristicInstance characteristic) → Future< void> - Stops subscribing to notifications for a specified characteristic.
-
subscribeToNotifications(
CharacteristicInstance characteristic) → Stream< void> - Starts subscribing to notifications for a specified characteristic.
-
toString(
) → String -
A string representation of this object.
inherited
-
writeCharacteristicWithoutResponse(
CharacteristicInstance characteristic, List< int> value) → Future<WriteCharacteristicInfo> - Perform writing a value to a specific characteristic without awaiting the acknowledgment from the peripheral.
-
writeCharacteristicWithResponse(
CharacteristicInstance characteristic, List< int> value) → Future<WriteCharacteristicInfo> - Perform writing a value to a specific characteristic and awaiting the acknowledgment from the peripheral.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ ReactiveBlePlatform
-
Platform-specific plugins should set this with their own platform-specific
class that extends ReactiveBlePlatform when they register themselves.
getter/setter pair