parse static method
Implementation
static YoutubeVideoUrl? parse(String url) {
// cSpell: ignore youtu
var matches = RegExp(
r'(?:https?:)?\/\/(?:(?:www\.)?youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)(?<id>[A-z0-9\-\_]+)')
.allMatches(url);
var id = matches.getValue("id");
if (id == null) return null;
return YoutubeVideoUrl._(id);
}