While working on a project, I came across the need to create a dynamic Youtube list of videos using the youtube_player_flutter package.
So here is how I went about developing the code.
To start with, I create a new flutter project. Then I opened up my PHPMyAdmin to start creating tables for storing the dynamic data that will be shown to the user.
Create A SQL Table
CREATE TABLE `videosapp` ( `youtubeid` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE videosapp ADD PRIMARY KEY (youtubeid); COMMIT;
Create the PHP file to provide the JSON data from the PHPMyAdmin database.
Create a Future Builder and retrieve the snapshot data and show it onto the screen. You can also use Firebase or any other backend service to display the list of videos by using StreamBuilder.
You can find the Full Source Code of the project here.
Flutter Youtube List From PHP - MySQL (using phpmyadmin)
Flutter Youtube List From PHP - MySQL (using phpmyadmin)
Flutter youtube list view using PHP and MySQL by converting it into json and the parsing it in the Flutter app. You can also use json directly if You don't want to use PHP. (All of these work remotely so You can edit and change it.)