ListView error Expanded inside ListView

Hello, How could I put an Expanded widget inside a ListView?? Thanks!!!

1 Like

Hey soteras,

In this case you can’t since Expanded Widget increases it’s size as much as it can with the space available, Since ListView essentially has an infinite height it will cause an error. You would need to put Expanded in a flex widget like Container so that it doesn’t expand infinitely


Thanks!!! It’s worked