breakTimeTypefromString function

BreakTimeType? breakTimeTypefromString(
  1. String? type
)

Converts a string type to the corresponding BreakTimeType enum value. Returns BreakTimeType.start if type is 'start', BreakTimeType.end if type is 'end', and null otherwise.

Implementation

BreakTimeType? breakTimeTypefromString(String? type) {
  switch (type) {
    case 'start':
      return BreakTimeType.start;
    case 'end':
      return BreakTimeType.end;
    default:
      return null;
  }
}