getYouTubeThumbnail method

String getYouTubeThumbnail({
  1. bool trimWhitespaces = true,
})

Returns YouTube thumbnail image URL for the given video ID.

Implementation

String getYouTubeThumbnail({bool trimWhitespaces = true}) {
  return 'https://img.youtube.com/vi/${toYouTubeId(trimWhitespaces: trimWhitespaces)}/maxresdefault.jpg';
}