fromValue static method

UserProfileTier fromValue(
  1. String? value
)

Safely parses a string into UserProfileTier. Falls back to UserProfileTier.none for null or unknown values.

Implementation

static UserProfileTier fromValue(String? value) {
  return UserProfileTier.values.firstWhere(
    (e) => e.value.toUpperCase() == value?.toUpperCase(),
    orElse: () => UserProfileTier.none,
  );
}