Baseflow / Baseflow/flutter_cache_manager

getSingleFile() doesn't return fully downloaded file

Abierto
#104 0 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Dart
Estrellas
809
Forks
510
Merge medio
6 min
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
dart, flutter
Área
mobile
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.