VideoId constructor
VideoId(
- String idOrUrl
Initializes an instance of VideoId with a url or video id.
Implementation
factory VideoId(String idOrUrl) {
final id = parseVideoId(idOrUrl);
if (id == null) {
throw ArgumentError.value(
idOrUrl,
'idOrUrl',
'Invalid YouTube video ID or URL',
);
}
return VideoId._internal(id);
}