Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Visual Flicker Persists When Popping Route Between Two Screens with MapWidgets

Abierto
#1,004 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Comienza reproduciendo el problema con dos pantallas que contengan un MapWidget, usando Navigator.push y Navigator.pop tal como se describe, y compara el comportamiento con el vídeo enlazado. Investiga el ciclo de vida de la PlatformView nativa durante la transición de pop, especialmente la limpieza del mapa que se ha extraído mientras se vuelve a mostrar el mapa de destino; se considera terminado cuando se puede volver a la primera pantalla sin parpadeos ni una pila de navegación que crezca.

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

Descripción

Bug Description
When navigating between two screens that both contain a MapWidget, a noticeable visual flicker occurs. This happens specifically when using Navigator.pop() to return from the top screen to the one below it. The map from the screen being popped seems to briefly render over the destination screen before disappearing, creating a jarring user experience.

Steps to Reproduce

  • Create a ScreenA that contains a MapWidget.

  • Create a ScreenB that also contains a MapWidget.

  • From ScreenA, push ScreenB onto the navigation stack

(e.g., Navigator.push(context, MaterialPageRoute(builder: (_) => ScreenB()))).

  • On ScreenB, have a button or back gesture that executes

Navigator.pop(context).

  • Pop ScreenB to return to ScreenA.

Observe the visual flicker as ScreenA is revealed.

Expected Behavior
The navigation transition when popping the route should be smooth, without any visual artifacts or flickering from the map on the previous screen.

Current Behavior
A flicker occurs where the MapWidget from ScreenB is briefly visible during the transition back to ScreenA.

Additional Context & Workarounds Tried
I have attempted several workarounds, but none provide a complete and stable solution:

  • Using popAndPush or replaceAll: These navigation methods successfully avoid the visual flicker. However, they are not viable solutions as they create memory leaks by creating new screen instances instead of returning to the original one, causing the navigation stack to grow indefinitely.

  • This leads me to believe there is still an underlying race condition or an incomplete resource cleanup in the native PlatformView lifecycle when one map instance is destroyed while another is being revealed during a pop transition.

Video

https://github.com/user-attachments/assets/65896649-5d3a-492a-8633-e71ad72ea574

Lenguaje dominante
Dart
Estrellas
379
Forks
204
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de mapbox/mapbox-maps-flutter

Todos los issues de mapbox/mapbox-maps-flutter

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.