clockMessageTypeFromString function

ClockMessageType clockMessageTypeFromString(
  1. String type
)

Converts the provided type string to a ClockMessageType.

Implementation

ClockMessageType clockMessageTypeFromString(String type) {
  switch (type) {
    case 'clockin':
      return ClockMessageType.clockIn;
    case 'clockout':
      return ClockMessageType.clockOut;
    case 'already clockout':
      return ClockMessageType.alreadyAttendance;
    default:
      return ClockMessageType.none;
  }
}