fromValue static method

PlaylistSortOrder? fromValue(
  1. int? value
)

Parses PlaylistSortOrder from a raw value.

Implementation

static PlaylistSortOrder? fromValue(int? value) {
  if (value == null) return null;
  return PlaylistSortOrder.values.firstWhere(
    (e) => e.value == value,
    orElse: () => throw FormatException('Invalid value: $value'),
  );
}