Shadow60539 / flutter_preload_videos

Preloading videos in Flutter πŸ’™

Home Page:https://medium.com/@sanjeevmadhav03/preloading-videos-in-flutter-4b65cf0681c6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dart Flutter

lib

Flutter Preload Videos from API

Introduction πŸš€

Preloading logic to reduce video initialization using isolate to fetch videos in the background so that the video experience is not disturbed.

Without the use of isolate, the video will be paused whenever there is an API call because the main thread will be busy fetching new video URLs.

More about isolate: 🌐 https://blog.codemagic.io/understanding-flutter-isolates/

Demo πŸ‘€

Output sample

Logic 🎯

lib

Usage 🎨

To clone and run this application, you'll need git and flutter installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/Shadow60539/flutter_preload_videos.git

# Go into the repository
$ cd flutter_preload_videos

# Install dependencies
$ flutter packages get

# Run the app
$ flutter run

Packages πŸ“¦

Package Description
video_player Render videos in Flutter
build_runner Build Custom Models
flutter_bloc BLoC State Management
freezed Code generation for immutable classes

Directory Structure 🏒

The project directory structure is as follows:

β”œβ”€β”€ android
β”œβ”€β”€ asset
β”œβ”€β”€ build
β”œβ”€β”€ images
β”œβ”€β”€ ios
β”œβ”€β”€ lib
β”œβ”€β”€ test
β”œβ”€β”€ analysis_options.yaml
β”œβ”€β”€ pubspec.lock
β”œβ”€β”€ pubspec.yaml

About

Preloading videos in Flutter πŸ’™

https://medium.com/@sanjeevmadhav03/preloading-videos-in-flutter-4b65cf0681c6


Languages

Language:Dart 90.7%Language:HTML 8.1%Language:Swift 0.9%Language:Kotlin 0.3%Language:Objective-C 0.1%