You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a gist where you can enable a disable the center key, and you can see that only highlight work, but the scrollTo not work when the center key is enable.
how can I keep the scroll to index behavior while have the center key? or maybe do you know other way to create a list that append items to the top of the list by preserving the scroll, the solution that I used is from flutter/flutter#21541 (comment)
thank you
The text was updated successfully, but these errors were encountered:
while (prevOffset != currentOffset &&
!(contains = isIndexStateInLayoutRange(index))) {
prevOffset = currentOffset;
final nearest = _getNearestIndex(index);
final moveTarget =
_forecastMoveUnit(index, nearest, usedSuggestedRowHeightIfAny)!;
if (moveTarget < 0) //can't forecast the move range
return null;
// assume suggestRowHeight will move to correct offset in just one time.
// if the rule doesn't work (in variable row height case), we will use backup solution (non-suggested way)
final suggestedDuration =
usedSuggestedRowHeightIfAny && suggestedRowHeight != null
? duration
: null;
remove
if (moveTarget < 0) //can't forecast the move range
return null;
is useful
while (prevOffset != currentOffset && !(contains = isIndexStateInLayoutRange(index))) { prevOffset = currentOffset; final nearest = _getNearestIndex(index); final moveTarget = _forecastMoveUnit(index, nearest, usedSuggestedRowHeightIfAny)!; if (moveTarget < 0) //can't forecast the move range return null; // assume suggestRowHeight will move to correct offset in just one time. // if the rule doesn't work (in variable row height case), we will use backup solution (non-suggested way) final suggestedDuration = usedSuggestedRowHeightIfAny && suggestedRowHeight != null ? duration : null;
remove if (moveTarget < 0) //can't forecast the move range return null; is useful
Hi, I try to create a bidirectional lazy load list like the like flutter docs said
https://github.com/flutter/flutter/blob/5464c5bac742001448fe4fc0597be939379f88ea/packages/flutter/lib/src/widgets/scroll_view.dart#L502-L513
I create a gist where you can enable a disable the center key, and you can see that only highlight work, but the
scrollTo
not work when the center key is enable.how can I keep the scroll to index behavior while have the center key? or maybe do you know other way to create a list that append items to the top of the list by preserving the scroll, the solution that I used is from flutter/flutter#21541 (comment)
thank you
The text was updated successfully, but these errors were encountered: