For ListView or GridView we wrap it with Container. But how can I give background color to SliverGrid?
How to give background color to SliverGrid?
6.5k views Asked by Figen Güngör At
3
There are 3 answers
0
On
Try DecoratedSliver as wrapper around SliverGrid.
This way, you can give any part of your Sliver* a decoration.
I'll just drop my solution here. I wrap my individual items with Container and give padding.
When the last row is not complete, I just add dummy item which is a Container with bg color until row is filled.