fromMap static method
Implementation
static NotificationPlayState? fromMap(dynamic value) {
if (value == null) return null;
if (value is String) {
return NotificationPlayState.values
.cast<NotificationPlayState?>()
.toList()
.firstWhere((e) => e?.name == value, orElse: () => null);
}
if (value is int) {
return value >= NotificationPlayState.values.length - 1 || value < -1
? null
: NotificationPlayState.values[value + 1];
}
return null;
}