muhammad369 / ResponsiveGrid_Flutter

Responsive Grid Layout for Flutter
MIT License
88 stars 27 forks source link

5 columns in a grid #15

Closed tiagorossig closed 3 years ago

tiagorossig commented 3 years ago

Since the arguments for the ResponsiveGridCol are integers, it seems impossible to have a grid with 5 columns (which would require a value of 2.4). Am I missing something, or is this the case?

muhammad369 commented 3 years ago

Yeah this is the case The entire row wide is assumed to be 12 cells, and each col occupies equally divided number of cells, just as Bootstrap

you can use ResponsiveGridList and you specify the desiredItemWidth and minSpacing and the row will contain as many cols as the parent width can hold

muhammad369 commented 3 years ago

Now you can set 5 cols in a row I've added a new property rowSegments that is 12 by default

for 5 cols in a row set it to 10 and set the col to occupy 2 cells, or set it to 20 and set the col to occupy 4 cells whatever granularity works for you

muhammad369 commented 3 years ago

included in version 1.3.0