Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 981 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 981 Bytes

youtube_video_info

flutter dart

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

example gif