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

A RenderViewport exceeded its maximum number of layout cycles #525

Open
nergal79 opened this issue Apr 12, 2024 · 0 comments
Open

A RenderViewport exceeded its maximum number of layout cycles #525

nergal79 opened this issue Apr 12, 2024 · 0 comments

Comments

@nergal79
Copy link

Package -> scrollable_positioned_list: ^0.3.8

getting a crash A RenderViewport exceeded its maximum number of layout cycles .. Stacktrace is huge so I have pasted it in the link below .

https://pastebin.com/9cWG55Tp

I am working on chat application .. i need to scroll the list whenever a tagged message is clicked. I using the code below.

itemScrollController.jumpTo(index: index, alignment: 0.5);

Widget code follows ->

 `Widget build(BuildContext context) { 
 return ScrollablePositionedList.separated(
  padding: const EdgeInsets.only(left: 8, bottom: 14, top: 8, right: 8).w,
  key: ValueKey(conversation.id),
  itemScrollController: pagingController.itemScrollController,
  itemPositionsListener: pagingController.itemPositionsListener,
  physics: const ScrollPhysics(),
  reverse: true,
  itemCount: pagingController.itemsLength(),
  itemBuilder: _messageItem,
  separatorBuilder: (BuildContext context, int index) =>
      12.verticalSpaceFromWidth,
);
}`

Its seems like a random crash, any input would be appreciated here .. Let me know if you need more detail on the issue.. Thanks..

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