Closed srkrishnan1989 closed 2 years ago
@srkrishnan1989 StyledText
parses xml tags asynchronously, so at first the widget is empty, and when the xml tags are parsed, it is rebuilt with text content, this causes the widget to resize. Therefore, when scrolling the list up (and down too), when the previous widgets are rebuilt, the row height jumps.
You can make the list item's height fixed, for example by wrapping a StyledText
in a SizedBox
widget with a given height, this will prevent height jumps on scroll.
in my app I can't make fixed height SizedBox.
scrolling issue on android
while scrolling from bottom to top/up, its jump to previous ListTile,
the code to reproduce the problem,
create fresh app using "flutter create -t skeleton my_app"
just replace code using styled_text on "sample_item_list_view.dart" file
replace this code
with
change items list length to 30 count,
now build the app and run on android devices,
while scrolling to bottom, it scrolls fine,
but slowly scroll up/top , 'ListTile' get jump/skip to previous.
same code made with normal Text widget (except style), it scrolls fine.