18 lines
378 B
Dart
18 lines
378 B
Dart
|
|
enum ReminderAction {
|
||
|
|
cancel('cancel'),
|
||
|
|
snooze10m('snooze_10m'),
|
||
|
|
timeout30s('timeout_30s'),
|
||
|
|
autoArchive('auto_archive');
|
||
|
|
|
||
|
|
const ReminderAction(this.value);
|
||
|
|
|
||
|
|
final String value;
|
||
|
|
|
||
|
|
static ReminderAction fromValue(String raw) {
|
||
|
|
return ReminderAction.values.firstWhere(
|
||
|
|
(item) => item.value == raw,
|
||
|
|
orElse: () => ReminderAction.timeout30s,
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|