parseType static method

PalVideos parseType(
  1. String data
)

Implementation

static PalVideos parseType(String data) {
  final search = PalVideos.values.where((element) => element.name == data);
  if (search.isEmpty) {
    throw 'video type not found';
  }
  return search.first;
}