BluetoothDeviceState.fromId constructor
BluetoothDeviceState.fromId(
- int id,
- BluetoothStatusCode bluetoothStatusCode
Implementation
factory BluetoothDeviceState.fromId(
int id, BluetoothStatusCode bluetoothStatusCode) {
switch (id) {
case _BluetoothDeviceStateConst.disconnected:
return BluetoothDeviceDisconnected(bluetoothStatusCode);
case _BluetoothDeviceStateConst.connecting:
return BluetoothDeviceConnecting(bluetoothStatusCode);
case _BluetoothDeviceStateConst.connected:
return BluetoothDeviceConnected(bluetoothStatusCode);
case _BluetoothDeviceStateConst.disconnecting:
return BluetoothDeviceDisconnecting(bluetoothStatusCode);
}
throw Error();
}