flutter_ble_peripheral library
Classes
- AdvertiseDataCore
- Core cross-platform advertising data model.
- AdvertiseSetParameters
- Extended advertising parameters for Android 8+ (API level 26).
- AdvertiseSettings
- Legacy advertising settings for Android (pre-Android 8).
- AndroidAdvertiseData
- Android-specific advertising data model.
- AndroidAdvertiseSettings
- Android advertising settings that directly map to Android's native API.
- DarwinAdvertiseSettings
- Darwin (iOS/macOS) specific advertising settings.
- FlutterBlePeripheral
- Advertises this device as a BLE peripheral, and serves the GATT service that connected centrals read from and write to.
- GattCharacteristic
- One characteristic of the service the peripheral serves.
- GattServerSettings
-
Asks
FlutterBlePeripheral.startto serve a GATT service alongside the advertisement. - GattSubscription
- Whether a central is subscribed to one characteristic.
- GattWrite
- What a central wrote, and which characteristic it wrote to.
- PeriodicAdvertiseSettings
- Periodic advertising settings for Android extended advertising.
- WindowsAdvertiseSettings
- Windows-specific advertising settings.
Enums
- AdvertiseMode
- The trade-off between advertising frequency and power consumption.
- AdvertiseTxPower
- The transmission power to advertise at, which sets how far the advertisement carries.
- GattCharacteristicProperty
- What a central may do with a characteristic the peripheral serves.
- PeripheralBluetoothState
- The result of a call that reaches the platform, covering both permission state and whether the adapter can be used.
- PeripheralState
- The live advertising state, as published on the state change stream.
Constants
- defaultRxCharacteristicUuid → const String
-
The Nordic UART Service characteristic a central writes to, which is what
FlutterBlePeripheral.onDataReceivedreports. - defaultTxCharacteristicUuid → const String
-
The Nordic UART Service characteristic the peripheral notifies on, which is
what
FlutterBlePeripheral.sendDatawrites to. - intervalHigh → const int
- High advertising interval: 1600 slots (1 second)
- intervalLow → const int
- Low advertising interval: 160 slots (100ms)
- intervalMax → const int
- Maximum advertising interval: 16777215 slots (~2.9 hours)
- intervalMedium → const int
- Medium advertising interval: 400 slots (250ms)
- intervalMin → const int
- Minimum advertising interval: 160 slots (100ms)
- nordicUartServiceUuid → const String
- The Nordic UART Service, the de facto standard for a serial-style link over GATT. Advertise this as the service uuid to be recognised by tools such as nRF Connect.
- phy1m → const int
- Bluetooth LE 1M PHY
- phy2m → const int
- Bluetooth LE 2M PHY
- phyCoded → const int
- Bluetooth LE Coded PHY
- txPowerHigh → const int
- High TX power level: 1 dBm
- txPowerLow → const int
- Low TX power level: -15 dBm
- txPowerMax → const int
- Maximum TX power level: 1 dBm
- txPowerMedium → const int
- Medium TX power level: -7 dBm
- txPowerMin → const int
- Minimum TX power level: -127 dBm
- txPowerUltraLow → const int
- Ultra low TX power level: -21 dBm
Typedefs
- BluetoothPeripheralState = PeripheralBluetoothState
- Former name of PeripheralBluetoothState.