Baseflow / Baseflow/flutter_cache_manager

getSingleFile() doesn't return fully downloaded file

Ouverte
#104 0 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Dart
Étoiles
809
Forks
510
Merge moyen
6 min
PR mergées (30 j)
1

Description

```
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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at the getSingleFile() entry point and reproduce the reported behavior with video_player using the Flutter and Android setup described in the issue. Confirm that the returned File is fully downloaded before video_player initialization; the issue is done when this behavior is reliable without replacing flutter_cache_manager with dio.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
dart, flutter
Domaine
mobile
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.