BluetoothManagerMacOS class

macOS-specific implementation of the plugin.

macOS does not expose a public API to toggle Bluetooth. This class reads the adapter state through CoreBluetooth on the native side and can open the Bluetooth pane in System Settings.

State changes are delivered through the bluetooth_manager/events EventChannel, backed by CBCentralManagerDelegate on the native side.

Constructors

BluetoothManagerMacOS()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getState() Future<BluetoothState>
Returns the current BluetoothState reported by the native macOS plugin.
getStateStream({int timer = 1000}) Stream<BluetoothState>
Emits the current BluetoothState every time the adapter state changes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openBluetoothSettings() Future<void>
Opens System Settings so the user can enable or disable Bluetooth.
toString() String
A string representation of this object.
inherited

Operators

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