1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-23 05:19:22 +00:00
comunicmobile/lib/enums/user_page_visibility.dart

15 lines
439 B
Dart

/// User page visibility
///
/// @author Pierre HUBERT
enum UserPageVisibility { PRIVATE, PUBLIC, OPEN }
/// Find the visibility level matching a string
UserPageVisibility userPageVisibilityFromString(String str) {
for (int i = 0; i < UserPageVisibility.values.length; i++)
if (UserPageVisibility.values[i].toString() == str)
return UserPageVisibility.values[i];
throw "$str is not a valid user page visibility level!";
}