checkPermission static method

Future<PermissionStatus> checkPermission(
  1. Permission permission
)

Implementation

static Future<PermissionStatus> checkPermission(Permission permission) async {
  var result =
      await _channel.invokeMethod<int>('checkPermission', <String, dynamic>{
    'permission': permission.toString(),
  });
  switch (result) {
    case 0:
      return PermissionStatus.granted;
    case 1:
      return PermissionStatus.denied;
    default:
      return PermissionStatus.undetermined;
  }
}