toPrivilegeLevel function
Implementation
PrivilegeLevel toPrivilegeLevel(int? index) {
switch (index) {
case 0:
return PrivilegeLevel.noPrivilege;
case 1:
return PrivilegeLevel.level1Privilege;
case 2:
return PrivilegeLevel.level2Privilege;
case 3:
return PrivilegeLevel.ownerPrivilege;
}
return PrivilegeLevel.unknown;
}