toNative method
Permission
toNative()
Returns the underlying Permission object used by permission_handler.
Implementation
Permission toNative() {
switch (this) {
case CkPermission.camera:
return Permission.camera;
case CkPermission.location:
return Permission.location;
case CkPermission.locationWhenInUse:
return Permission.locationWhenInUse;
case CkPermission.locationAlways:
return Permission.locationAlways;
case CkPermission.microphone:
return Permission.microphone;
case CkPermission.photos:
return Permission.photos;
case CkPermission.photosAddOnly:
return Permission.photosAddOnly;
case CkPermission.storage:
return Permission.storage;
case CkPermission.notification:
return Permission.notification;
case CkPermission.contacts:
return Permission.contacts;
case CkPermission.sms:
return Permission.sms;
case CkPermission.bluetooth:
return Permission.bluetooth;
case CkPermission.bluetoothScan:
return Permission.bluetoothScan;
case CkPermission.bluetoothAdvertise:
return Permission.bluetoothAdvertise;
case CkPermission.bluetoothConnect:
return Permission.bluetoothConnect;
case CkPermission.mediaLibrary:
return Permission.mediaLibrary;
}
}