fromString static method

VideoDefinition? fromString(
  1. String string
)

Implementation

static VideoDefinition? fromString(String string) => switch (string) {
      "hd" => high,
      "sd" => standard,
      _ => null,
    };