BleShieldNativePlatform class abstract

Constructors

BleShieldNativePlatform()

Properties

availabilityStream → Stream<AvailabilityState>
no setter
bleConnectionChangeStreamController → BleShieldNativeStreamController<BleConnectionChange>
final
hasAddressDeviceIds → bool
Whether this platform reports device ids as Bluetooth addresses — a MAC on Android/Windows/Linux, a UUID on Apple — which are case-insensitive and which platforms report in different cases (Android upper-cases MACs, Windows/WinRT lower-cases them). Ids are therefore canonicalised: the update* handlers below canonicalise on ingestion, so every stream event, callback and per-device map key is canonical, and the stream filters canonicalise the query so consumers may still pass an id in any case. Native calls take the other form the same DeviceId carries; see that class for both conversions.
no setter
hashCode → int
The hash code for this object.
no setterinherited
onAvailabilityChange ↔ OnAvailabilityChange?
getter/setter pair
onConnectionChange ↔ OnConnectionChange?
getter/setter pair
onConnectionParametersChange ↔ OnConnectionParametersChange?
getter/setter pair
onMtuChange ↔ OnMtuChange?
getter/setter pair
onPairingStateChange ↔ OnPairingStateChange?
getter/setter pair
onScanResultUpdate ↔ OnScanResult?
getter/setter pair
onValueChange ↔ OnValueChange?
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scanStream → Stream<BleDevice>
Streams
no setter
skipDuplicatesEnabled → bool
Whether scan de-duplication is currently active. Toggled by BleShieldNative.startScan/stopScan.
no setter

Methods

characteristicValueStream(String deviceId, String characteristicId) → Stream<Uint8List>
connect(String deviceId, {Duration? connectionTimeout, bool autoConnect = false, ConnectionPlatformConfig? platformConfig}) → Future<void>
connectionChangeStream(String deviceId) → Stream<BleConnectionChange>
connectionStream(String deviceId) → Stream<bool>
disableBluetooth() → Future<bool>
disconnect(String deviceId) → Future<void>
discoverServices(String deviceId, bool withDescriptors, {DiscoverServicesPlatformConfig? platformConfig}) → Future<List<BleService>>
enableBluetooth() → Future<bool>
getBluetoothAvailabilityState() → Future<AvailabilityState>
getConnectionState(String deviceId) → Future<BleConnectionState>
getSystemDevices(List<String>? withServices) → Future<List<BleDevice>>
hasPermissions({bool withAndroidFineLocation = false}) → Future<bool>
isPaired(String deviceId) → Future<bool>
isScanning() → Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pair(String deviceId) → Future<bool>
pairingStateStream(String deviceId) → Stream<bool>
readDescriptorValue(String deviceId, String service, String characteristic, String descriptor, {Duration? timeout}) → Future<Uint8List>
readRssi(String deviceId) → Future<int>
readValue(String deviceId, String service, String characteristic, {Duration? timeout}) → Future<Uint8List>
receivesAdvertisements(String deviceId) → bool
requestConnectionPriority(String deviceId, BleConnectionPriority priority) → Future<void>
requestDevice({ScanFilter? scanFilter, PickerPlatformConfig? platformConfig}) → Future<BleDevice>
requestMtu(String deviceId, int expectedMtu) → Future<int>
requestPermissions({bool withAndroidFineLocation = false}) → Future<void>
resetScanDeduplication() → void
Forgets results remembered for de-duplication so a device seen in a previous scan session is not treated as a duplicate in a new one.
setLogLevel(BleLogLevel logLevel) → Future<void>
setNotifiable(String deviceId, String service, String characteristic, BleInputProperty bleInputProperty) → Future<void>
setSkipDuplicates(bool enabled) → void
Turns scan de-duplication on or off. Does not clear remembered results; call resetScanDeduplication to begin a fresh scan session.
startScan({ScanFilter? scanFilter, PlatformConfig? platformConfig}) → Future<void>
stopScan() → Future<void>
toString() → String
A string representation of this object.
inherited
unpair(String deviceId) → Future<void>
updateAvailability(AvailabilityState state) → void
updateCharacteristicValue(String deviceId, String characteristicId, Uint8List value, int? timestamp) → void
updateConnection(String deviceId, bool isConnected, [String? error, BleShieldNativeErrorCode? errorCode, int? nativeErrorCode]) → void
updateConnectionParameters(BleConnectionParametersChange update) → void
updateMtu(String deviceId, int mtu) → void
The ATT MTU the platform reported for deviceId, requested or not. Not de-duplicated: the consumer keeps the last value.
updatePairingFailure(String deviceId) → void
A failed bond is an event, not a state: it reports isPaired: false regardless of what was cached before, so it must not go through updatePairingState's dedup — otherwise every failure after the first is swallowed (#325). The cached value is still refreshed so later genuine transitions dedup as usual.
updatePairingState(String deviceId, bool isPaired) → void
updateScanFailure(int errorCode) → void
The platform scanner failed and stopped (see the Pigeon onScanFailed). Surfaces as an error on scanStream, carrying the raw platform code in details.
updateScanResult(BleDevice bleDevice) → void
Update Handlers
writeDescriptorValue(String deviceId, String service, String characteristic, String descriptor, Uint8List value) → Future<void>
writeValue(String deviceId, String service, String characteristic, Uint8List value, BleOutputProperty bleOutputProperty) → Future<void>

Operators

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