getCurrentState property
Future<Map<HeadsetType, HeadsetState> >
getCurrentState
Implementation
Future<Map<HeadsetType, HeadsetState>> get getCurrentState async {
final state = await _channel!.invokeMethod('getCurrentState');
return {
HeadsetType.WIRED:
state[0] ? HeadsetState.CONNECTED : HeadsetState.DISCONNECTED,
HeadsetType.WIRELESS:
state[1] ? HeadsetState.CONNECTED : HeadsetState.DISCONNECTED,
};
}