Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There have sharking gaps when jump to list end and scrolling down. #84

Open
Onperson opened this issue Sep 20, 2024 · 1 comment
Open

Comments

@Onperson
Copy link

@OverRide
void initState() {
super.initState();
_jumpIndex = monthList.indexOf(DateFormat("yyyy-MM").format(DateTime.now()).toString());
if(widget.dateType == DateModel.DATE_TYPE_DAY && widget.selectStartDate.isNotEmpty){
_jumpIndex = monthList.indexOf(DateFormat("yyyy-MM").format(DateTime.parse(widget.selectStartDate)).toString());
}
Future.delayed(Duration(milliseconds: 50), () {
itemScrollController.jumpTo(index: _jumpIndex);
});
}
@OverRide
Widget build(BuildContext context) {
return Column(
children: [
CommonWidgetsProvider.getCommonDataWeeklyTitle(),
Expanded(child: Container(
color: Colors.white,
child: ScrollablePositionedList.builder(
itemCount: monthList.length,
semanticChildCount: monthList.length,
shrinkWrap: true,
padding: EdgeInsets.all(0),
initialScrollIndex: (_jumpIndex + 1),
itemBuilder: (context, index){
return StickyHeader(
header: _itemMonth(index),
content:_itemDay(index),
);
},
itemScrollController: itemScrollController,)
), flex: 1,),
SizedBox(height: 20,)
],
);
}

@Onperson
Copy link
Author

It not always showing, just the last there mouths have the sharking gaps when scrolling, and i don't know why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant