Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 20, 2021 07:58 am GMT

"youtube_video_info" flutter package

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: flutteryoutube_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.13242var durationSeconds = videoData.durationSeconds; // 167

example gif


Original Link: https://dev.to/baransel/youtubevideoinfo-flutter-package-2mn7

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To