flutter / flutter/devtools

Scrolling for treetable needs position clamping to prevent overshooting

Ouverte
#4,264 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
P3 screen: app size
Langage dominant
Dart
Étoiles
1.7k
Forks
404
Merge moyen
6 j 17 h
PR mergées (30 j)
18

Description

https://github.com/flutter/devtools/pull/4226/files#diff-7f63e0b64be4d80b632e5eefe1cac93308dff718f53fc1fe6e1db774ffd4e7a9R198

Current Problem: When autoscrolling for the treetable, if the index is near the maxScrollingExtent, it will overshoot and therefore create a bouncing animation.

Solution: By clamping the position to be between 0.0 - maxScrollExtent, this will make sure the scroll will stay in the appropriate range. However, maxScrollExtent is not updating after parents are expanded and before scrolling happens. Therefore, if an index is greater than the previous maxScrollExtent even if it is in range after parents are expanded, it still believes that the index is not in range and therefore not scroll to the correct position.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

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