workingFromTypeFromString function
Converts a string to a WorkingFromType enum value.
Implementation
WorkingFromType? workingFromTypeFromString(String? type) {
switch (type) {
/// Matches 'wfa' and returns [WorkingFromType.anywhere].
case 'wfa':
return WorkingFromType.anywhere;
/// Matches 'wfo' and returns [WorkingFromType.office].
case 'wfo':
return WorkingFromType.office;
/// Returns null for any other input.
default:
return null;
}
}