MethodChannelBleSdk class
An implementation of BleSdkPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- BleSdkPlatform
- MethodChannelBleSdk
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
characteristicResult(
) → Stream< CharacteristicValue> -
subscription characteristic result with read/write
return CharacteristicValue
override
-
checkBonded(
) → Future< bool> -
check bonded ble device after connect
return bool
override
-
checkPermission(
) → Future< PermissionResult> -
check permission app
return PermissionResult
override
-
connect(
ConnectModel connectModel) → Future< bool> -
connect ble device with
deviceId
createBond
using open pin code dialog with read/write characteristic authorizeoverride -
deviceResult(
) → Stream< BluetoothBLEModel> -
subscription scan BluetoothBLEModel device
override
-
disconnect(
) → Future< bool> -
disconnect current ble device
override
-
discoverServices(
) → Future< List< Service> > -
discoverServices device current connect
return Services
override
-
initialSdk(
) → Future< bool> -
initialSdk
override
-
isBluetoothAvailable(
) → Future< bool> -
check bluetooth on/off
override
-
isLocationAvailable(
) → Future< bool> -
check location on/off
override
-
logResult(
) → Stream< Log> -
subscription log characteristic result with read/write/notification/indication
return Log
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readCharacteristic(
Characteristic characteristic) → Future< CharacteristicValue> -
read characteristic with
characteristic
return CharacteristicValueoverride -
requestPermission(
) → Future< bool> -
request permission return bool
override
-
requestPermissionSettings(
) → Future< void> -
open settings detail app
override
-
setIndication(
Characteristic characteristic) → Future< bool> -
set indication with
characteristic
contains notify return booloverride -
setNotification(
Characteristic characteristic) → Future< bool> -
set notification with
characteristic
contains notify return booloverride -
startScan(
ScanModel scanModel) → Future< void> -
start scan ble with services default list empty
services BLE ex: 1808, FFF0, ....
override
-
stateBluetoothResult(
) → Stream< StateBluetooth> -
subscription on/off StateBluetooth bluetooth
override
-
stateConnectResult(
) → Stream< StateConnect> -
subscription connection StateConnect device
override
-
stopScan(
) → Future< void> -
stop scan ble
override
-
toString(
) → String -
A string representation of this object.
inherited
-
turnOnBluetooth(
) → Future< void> -
turn on bluetooth
override
-
turnOnLocation(
) → Future< void> -
turn on location
override
-
unBonded(
ConnectModel model) → Future< bool> -
un bonded ble device with
deviceId
TODO: support only androidoverride -
writeCharacteristic(
CharacteristicValue value) → Future< CharacteristicValue> -
write characteristic with
value
return CharacteristicValueoverride -
writeCharacteristicNoResponse(
CharacteristicValue value) → Future< bool> -
read characteristic with
characteristic
return CharacteristicValueoverride
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- characteristicChannel ↔ EventChannel
-
getter/setter pair
- deviceChannel ↔ EventChannel
-
getter/setter pair
- logsChannel ↔ EventChannel
-
getter/setter pair
- stateBluetoothChannel ↔ EventChannel
-
getter/setter pair
- stateConnectChannel ↔ EventChannel
-
getter/setter pair