Shadow60539/flutter_preload_videos
Flutter で動画を事前読み込みする 💙
- Stars
- 143
- Forks
- 42
- 最終プッシュ(UTC)
- 2023/04/23
- プロジェクト状態
- 公開中
言語DartHTMLSwiftKotlinObjective-C
技術トピック
使用している依存関係
依存関係一覧 10 件
- flutter
{"sdk":"flutter"} - cupertino_icons
^1.0.2 - flutter_bloc
^8.1.2 - video_player
^2.6.1 - flutter_isolate
^2.0.2 - injectable
^1.4.1 - injectable_generator
^1.4.1 - flutter_test開発用
{"sdk":"flutter"} - build_runner開発用
any - freezed開発用
any
ランキング
元の README
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
README を開く / 閉じる
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