Created
June 14, 2022 11:23
-
-
Save nbnD/c9c669e3f4fdecea0ecced3b61727f02 to your computer and use it in GitHub Desktop.
YoutubeVideo Player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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