hasPermission method

Future<BluetoothPeripheralState> hasPermission()

Implementation

Future<BluetoothPeripheralState> hasPermission() async {
  if (!Platform.isAndroid) return BluetoothPeripheralState.unknown;
  final response = await _methodChannel.invokeMethod<int>('hasPermission');
  return response == null
      ? BluetoothPeripheralState.unknown
      : BluetoothPeripheralState.values[response];
}