1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-29 16:26:27 +00:00
comunicmobile/lib/enums/user_page_visibility.dart

15 lines
439 B
Dart
Raw Normal View History

/// User page visibility
///
/// @author Pierre HUBERT
enum UserPageVisibility { PRIVATE, PUBLIC, OPEN }
2019-04-24 09:24:05 +00:00
/// 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!";
}