Flame chart - jumpTo called before scroll position offsets have new size
- Lenguaje dominante
- Dart
- Estrellas
- 1.7k
- Forks
- 404
- Merge medio
- 6 d 17 h
- PR fusionados (30 d)
- 18
Descripción
In flame_chart.dart, we call
```
linkedHorizontalScrollControllerGroup.jumpTo(newScrollOffset);
```
to update the scroll offset as we zoom. We call this inside of an animation controller listener `zoomController.addListener(() { ... })`. At times when we call this, `scrollController.position.maxScrollOffset` is not updated for the new zoom level and layout size, causing `jumpTo` to fire BallisticScrollActivities to bounce the scroll offset back to what it thinks is the `maxScrollOffset`.
We need to have a way to call `jumpTo` when we can guarantee that the min / max scroll offsets are updated for the new zoom value.
I attempted to set these offsets manually using `scrollController.position.applyContentDimensions(minScrollOffset, maxScrollOffset)` but this results in an error regarding gesture detectors: `The replaceGestureRecognizers() method can only be called during the layout phase.`
Guía de contribución
Línea de trabajo
Start in flame_chart.dart at the zoomController listener and the linkedHorizontalScrollControllerGroup.jumpTo(newScrollOffset) call. Reproduce zooming near a scroll boundary, then verify that jumpTo runs only after the new min/max scroll offsets are available, without triggering ballistic bounce or the gesture-detector layout error.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- dart, flutter
- Área
- data-visualization, frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100