tryParse static method
- String val
Parses the provided val as a UserNum, if val meets the validation,
or returns null otherwise.
If val contains any spaces, they are omitted.
Implementation
static UserNum? tryParse(String val) {
try {
return UserNum(val);
} catch (_) {
return null;
}
}