@dominik not sure I fully understand its usefulness? Is it just to allow me to define a widget that can be used in listviews but also in parents that have bounds?
Wondering what the difference is to just wrapping the List items in SizedBox ?
SizedBox always poses constraints. LimitedBox only constraints when unbounded.
A typical example is let’s you have a loading widget that’s used across your app. Inside of a list or a sliver you need that to have a definite size but if its constrained already by some other widget it makes sense for the loading indicator to fill up the entire widget.
So when you want something that’s allowed to fill up the parent but handle itself in situations where the parent doesn’t constrain the child, LimitedBox is useful
For me, it was quite handy when I was creating a custom Sliver version of the RefreshIndicator.
I used the SizedOverflowBox with a Size.fromHeight(double.minPositive) to render an almost invisible SliverToBoxAdapter, and then I used a Transform.translate to actually display the inner refresh indicator body with a size and an offset equals to the overscroll value.
Thanks! I now understand what I can use it for. (I had never understood it before.)
I think the name is confusing, especially if you already know OverflowBox. I sometimes use OverflowBox to ignore the side paddings and display a carousel in full screen width, and I assumed SizedOverflowBox could be used instead. It actually cannot be used for the same purpose.
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.