parseStatusFromEnum static method

String parseStatusFromEnum(
  1. ReadingStatus status
)

Implementation

static String parseStatusFromEnum(ReadingStatus status) {
  switch (status) {
    case ReadingStatus.completed:
      return 'completed';
    case ReadingStatus.dropped:
      return 'dropped';
    case ReadingStatus.on_hold:
      return 'on_hold';
    case ReadingStatus.plan_to_read:
      return 'plan_to_read';
    case ReadingStatus.re_reading:
      return 're_reading';
    case ReadingStatus.reading:
      return 'reading';
  }
}