Bluetooth provider
Generated reference for ovok_flutter: bluetooth provider.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.29+c3980d5
BluetoothProvider
class BluetoothProvider extends StatefulWidgetProvides a Bluetooth runtime and its live snapshot to descendant widgets.
The application owns runtime and must dispose it when it is no longer
needed.
Constructors
BluetoothProvider.new
BluetoothProvider({
required BluetoothRuntime runtime,
required Widget child,
Key? key,
})Creates a scope for runtime and child.
| Parameter | Type | Kind | Default |
|---|---|---|---|
runtime | BluetoothRuntime | required named | |
child | Widget | required named | |
key | Key? | named |
Properties
BluetoothProvider.runtime
final BluetoothRuntime runtimeThe runtime the descendant widgets use.
BluetoothProvider.child
final Widget childThe widgets that need Bluetooth access.
Methods
BluetoothProvider.of
BluetoothRuntime of(BuildContext context)Reads the nearest runtime, subscribing to its provider scope.
| Parameter | Type | Kind | Default |
|---|---|---|---|
context | BuildContext | positional |
Returns BluetoothRuntime.
BluetoothProvider.snapshotOf
BluetoothSnapshot snapshotOf(BuildContext context)Reads the current runtime snapshot and rebuilds when it changes.
| Parameter | Type | Kind | Default |
|---|---|---|---|
context | BuildContext | positional |
Returns BluetoothSnapshot.
Last updated on