Flame chart - jumpTo called before scroll position offsets have new size
- 主要语言
- Dart
- 星标
- 1.7k
- 派生
- 404
- 平均合并
- 6 天 17 小时
- 30 天内合并 PR
- 18
描述
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.`
贡献指南
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart, flutter
- 领域
- data-visualization, frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100