Slivers
I’ll be honest, the first few times I tried to use slivers, I really struggled. It’s a bit of a mental switch from the widgets we have learned about so far because it introduces the complexities of scrolling. We have already seen slivers in action when we briefly looked at ListView
.
The main issue is that when you add scrolling into your app, you effectively remove constraints around the size of your widget. If a widget is in a vertically scrollable area, then it can become infinitely tall and, unsurprisingly, Flutter isn’t keen on displaying infinitely large widgets.
Therefore, although we will look at this area now, I strongly suggest that if you want to use slivers, you do some serious research into the area first. Otherwise, you’ll be bouncing from errors to overflows and back to errors with no hope in sight. However, if you can master this area, then you can make some seriously impressive layouts that will definitely impress your users...