getQualityUrl static method

YoutubeVideoQualityUrl getQualityUrl(
  1. int quality,
  2. List<YoutubeVideoQualityUrl> videoUrls
)

Get quality url.

Implementation

static YoutubeVideoQualityUrl getQualityUrl(
  int quality,
  List<YoutubeVideoQualityUrl> videoUrls,
) {
  return videoUrls.firstWhere(
    (element) => element.quality == quality,
    orElse: () => videoUrls.first,
  );
}