Baseflow / Baseflow/flutter_cache_manager
getSingleFile() doesn't return fully downloaded file
- 主要言語
- Dart
- スター
- 809
- フォーク
- 510
- 平均マージ
- 6分
- マージ済み PR(30日)
- 1
説明
```
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17763.678], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.4)
[√] VS Code (version 1.37.0)
[√] Connected device (1 available)
```
For those that are attempting to use getSingleFile() before using video_player to play a downloaded video, even when doing an await on getSingleFile() the File is very often returned before the video is downloaded fully, which causes the video player to fail initialization.
No attempts at re-downloading or re-initilializing seemed to work, so dropped use of flutter_cache_manager and switched to downloading the file locally using dio package. This obviously negates the benefit of cache management, but it seemed to respect await properly by ensuring that the file returned is completely downloaded before returning.
コントリビューションガイド
調査の方向性
getSingleFile() のエントリポイントから開始し、issue に記載された Flutter および Android のセットアップで video_player を使用して、報告された動作を再現します。video_player の初期化前に、返された File が完全にダウンロードされていることを確認します。この動作が flutter_cache_manager を dio に置き換えることなく安定して機能すれば、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100