Skip to content

Instantly share code, notes, and snippets.

@nbnD
Created June 14, 2022 11:23
Show Gist options
  • Save nbnD/c9c669e3f4fdecea0ecced3b61727f02 to your computer and use it in GitHub Desktop.
Save nbnD/c9c669e3f4fdecea0ecced3b61727f02 to your computer and use it in GitHub Desktop.
YoutubeVideo Player
import 'package:flutter/material.dart';
import 'video_player.dart';
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(appBar: AppBar(title:const Text("Youtube player Demo")),
body:SingleChildScrollView(
child: Column(children: [
YoutubeVideo(
"https://www.youtube.com/watch?v=Ci4t-NkOY3I&list=PLjxrf2q8roU23XGwz3Km7sQZFTdB996iG"),
ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: 20,
itemBuilder: (ctx,i){
return ListTile(title: Text("Item $i"),);
})
],),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment