breakTypeFromString function

BreakType breakTypeFromString(
  1. String type
)

Converts the provided type string to a BreakType.

Implementation

BreakType breakTypeFromString(String type) {
  switch (type) {
    case 'start':
      return BreakType.start;
    case 'end':
      return BreakType.end;
    default:
      return BreakType.none;
  }
}