flutter_youtube 2.0.0

flutter_youtube #

Flutter Plugin to play youtube Videos using youtube player api (android)


  • Android
  • iOS

How to Use #

  flutter_youtube: "^2.0.0"


import 'package:flutter_youtube/flutter_youtube.dart';


  apiKey: "<API_KEY>",
  videoUrl: "<Youtube Video URL>",
  autoPlay: true, //default falase
  fullScreen: true //default false

Video End Listener #

Note Right now only supported in android

FlutterYoutube.onVideoEnded.listen((onData) {
  //perform your action when video playing is done
apiKeyString (Not Null)
videoUrlString (Not Null)
videoIdString (Not Null)
autoPlayBoolean (Optional)false
fullScreenBoolean (Optional)false

API Key #

your API key is what you need to use so your application can submit API requests to youtube. For that you are gonna need a Google Account to access the Google API Console, request an API key, and register your application. After that create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests. More here https://developers.google.com/youtube/v3/getting-started


  • major update
  • var youtube = new FlutterYoutube() to FlutterYoutube.;


  • iOS Crash Fixes


  • Only use var youtube = new FlutterYoutube();


  • Merged PR #36 and #32


  • Support Android X.
  • Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.


  • Broken ';' fixed



  • Video play complete listener Crash fixed


  • Youtube embed URL
  • Video AutoPlay
  • Video play complete listener


  • Bug fixes (video pause when screen rotated)


  • iOS Support added

[0.1.1] - 17-04-2018

  • Minor BugFixes

[0.1.1] - 17-04-2018

  • BugFixes

[0.1.0] - 17-04-2018

  • Initial Release
  • Play youtube video using url or by video id
  • setFullScreen


flutter_youtube_example #

Demonstrates how to use the flutter_youtube plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_youtube: ^2.0.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_youtube/flutter_youtube.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Document public APIs. (-1 points)

10 out of 10 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
meta ^1.1.7 1.1.8
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8