getVideoFromId method Null safety
Get a video by its video ID
Returns VideoFull
Arguments:
videoId
The video ID as a stringincludes
Request extra data be included in the results. They are not guarenteed to be returned.
Implementation
@override
Future<VideoFull> getVideoFromId(String videoId, {List<Includes>? includes}) async {
final Map<String, dynamic> params = {'id': videoId};
// Add the info the videos must include
_addIncludes(includes, params);
final Response response = await get(path: _Constants.videosPath, params: params);
return VideoFull.fromMap(jsonDecode(response.body).first);
}