fromStringValue static method

AuthenticationState fromStringValue(
  1. String value
)

Implementation

static AuthenticationState fromStringValue(String value) {
  return AuthenticationState.values.firstWhere(
    (state) => state.toString().split('.').last == value,
    orElse: () => AuthenticationState.error,
  );
}