tryParse static method

UserTextStatus? tryParse(
  1. String val
)

Parses the provided val as a UserTextStatus, if val meets the validation, or returns null otherwise.

Implementation

static UserTextStatus? tryParse(String val) {
  try {
    return UserTextStatus(val);
  } catch (_) {
    return null;
  }
}