toPermission method
Implementation
Permission toPermission() {
switch (this) {
case 'FULL_CONTROL':
return Permission.fullControl;
case 'WRITE':
return Permission.write;
case 'WRITE_ACP':
return Permission.writeAcp;
case 'READ':
return Permission.read;
case 'READ_ACP':
return Permission.readAcp;
}
throw Exception('$this is not known in enum Permission');
}