The following assertion was thrown during performLayout():
BoxConstraints forces an infinite height.
The offending constraints were:
BoxConstraints(w=1182.0, h=Infinity)
I’m on web.
I can see the exception in the console, but there’s no visual indication of the error; I mean that nothing happens on the screen, the tooltip works, everything around is placed correctly. I’m trying to reproduce the error in a different project, but it’s not easy. Through testing, I noticed that the error doesn’t occur if I simply copy the widget tree without using GoRouter with StatefulShellRoute and StatefulShellBranches.
I had a similar issue, the issue is probably with the StatefulShellRoute.builder. To validate that, try to copy your IconButton directly on the StatefulShellRoute.builder to see if you still have the issue.
For me, the solution was to move the SingleChildScrollView to the child view instead of the ShellRoute.builder.
final router = GoRouter(routes: [
ShellRoute(
builder: (context, state, child) =>
Scaffold(
body: SingleChildScrollView( // <-- my issue, solved by moving it to the child directly
child: child
)
),
routes: [GoRoute(path: "/a", builder: (context, state) => AView())])
]);
Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape.