flutter / flutter/devtools

Scrolling for treetable needs position clamping to prevent overshooting

Offen
#4,264 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P3 screen: app size
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.