workingFromTypeFromString function

WorkingFromType? workingFromTypeFromString(
  1. String? type
)

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;
  }
}