FlutterBlePeripheral class

Constructors

FlutterBlePeripheral()
Singleton factory
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isAdvertising Future<bool>
Returns true if advertising or false if not advertising
no setter
isConnected Future<bool>
Returns true if device is connected
no setter
isSupported Future<bool>
Returns true if advertising over BLE is supported
no setter
onMtuChanged Stream<int>
Returns Stream of MTU updates.
no setter
onPeripheralStateChanged Stream<PeripheralState>?
Returns Stream of state.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

enableBluetooth({bool askUser = true}) Future<bool>
Stop advertising
hasPermission() Future<BluetoothPeripheralState>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAppSettings() Future<void>
openBluetoothSettings() Future<void>
requestPermission() Future<BluetoothPeripheralState>
sendData(Uint8List data) Future<void>
Start advertising. Takes AdvertiseData as an input.
start({required AdvertiseData advertiseData, AdvertiseSettings? advertiseSettings, AdvertiseSetParameters? advertiseSetParameters, AdvertiseData? advertiseResponseData, AdvertiseData? advertisePeriodicData, PeriodicAdvertiseSettings? periodicAdvertiseSettings}) Future<BluetoothPeripheralState>
Start advertising. Takes AdvertiseData as an input.
stop() Future<BluetoothPeripheralState>
Stop advertising
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited