This content originally appeared on DEV Community and was authored by Baransel
pub.dev/youtube_video_info
github.com/kaex/youtube_video_info
This is a lightweight⚡ package to fetch video info for YouTube from the url
To install, add to pubspec.yaml
flutter:
sdk: flutter
youtube_video_info: ^1.0.0
and then run flutter pub get
Import the library
import 'package:youtube_video_info/youtube.dart';
Calling the method
YoutubeDataModel videoData = await YoutubeData.getData(link);
Example
var title = videoData.title; // "Ed Sheeran - Bad Habits [Official Video]"
var averageRating = videoData.averageRating; // 4.13242
var durationSeconds = videoData.durationSeconds; // 167
This content originally appeared on DEV Community and was authored by Baransel
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.

APA
MLA
Baransel | Sciencx (2021-08-20T07:58:18+00:00) “youtube_video_info” flutter package. Retrieved from https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/
" » “youtube_video_info” flutter package." Baransel | Sciencx - Friday August 20, 2021, https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/
HARVARDBaransel | Sciencx Friday August 20, 2021 » “youtube_video_info” flutter package., viewed ,<https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/>
VANCOUVERBaransel | Sciencx - » “youtube_video_info” flutter package. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/
CHICAGO" » “youtube_video_info” flutter package." Baransel | Sciencx - Accessed . https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/
IEEE" » “youtube_video_info” flutter package." Baransel | Sciencx [Online]. Available: https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/. [Accessed: ]
rf:citation » “youtube_video_info” flutter package | Baransel | Sciencx | https://www.scien.cx/2021/08/20/youtube_video_info-flutter-package/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.