fromValue static method

VideoType? fromValue(
  1. String? value
)

Parses VideoType from a raw value.

Implementation

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