It is basic youtube video player which creates using Flutter with the help of Youtube Data Api V3.
- You need to create folder called "utilities" within lib "folder" of project, In side utilities folder you have to create file called "keys.dart" you can call it anything but make sure while importing in other files with same name you provided, Inside keys.dart you have to write these codes:
- Go to https://console.developers.google.com
- Create project there with any name "Youtube Data Api"
- Go to Api Library
- Search Youtube, you will get Youtube Data V3 click on it
- Enable it
- Click on Create Credentials button at top right side
- Choose Youtube Data Api V3 and then you will see another option called 'Where you will be able to calling the API from?' select Either iOS or Android
- Now check on Public Data
- Click on What credentials do i need?
- You will see key now just COPY it
- Click on Done NOT done yet next
- Scroll Down you will see Restrict Key radio button, select it
- Select api which will be like Youtube Api Data V3
- Now Click on Save.
It's time to paste your copied key inside lib->utilities->keys.dart
For iOS users please setup youtube player plugin in your flutter app like this:
Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.
You all good to go!
If you got any issues open up issue i will be helping you.
Thanks for reading