Subtitles section Play video Print subtitles Sometimes, you just need a little bit of space. Wait, no, not like that. I meant space between widgets. You can add padding or size boxes, but you'd have to know if the gap is inside a column or row to specify the direction that the space should expand. Both options can get verbose, potentially making your code harder to read. Instead, you can add a gap. It's like a size box, but you don't have to keep track of whether it's inside a row or column. You always get a gap that takes up the specified space in the parent container's main access direction. It works inside scrollable widgets like ListViews, too. If you're working with a small amount of space, avoiding overflow, maxGap will only fill the available space up to your specified size. Finally, for some custom scrolling action, check out sliverGap. So next time you need some space, add a gap. For more info on gap and all the other packages, head to pub.dev.
B1 US gap space column size direction dev Gap (Package of the Week) 5 0 redpapper posted on 2024/08/19 More Share Save Report Video vocabulary