Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Flutter Staggered grid view supports multiple columns with different row sizes. In this blog, we will look to design a page with the different column count at the different row.
Read more about Flutter app development from mobikul.
StaggeredTileBuilder is used to create different no of the column in row and height of each tile.
There are three types of staggered tile, StaggeredTile.count , StaggeredTile.fit StaggeredTile.extent .
StaggeredTile.count
StaggeredTile.fit
StaggeredTile.extent
We will use StaggeredTile.extent(this.crossAxisCellCount, this.mainAxisExtent).
StaggeredTile.extent(this.crossAxisCellCount, this.mainAxisExtent).
Where crossAxisCellCount is the number of column in a row and mainAxisExtent is the height of row item/tile.
crossAxisCellCount
mainAxisExtent
Here, we will show the 1,2,3 column count on different rows.
Let’s calculate crossAxisCellCount
SingleColumn crossAxisCellCount = 1*2*3=6/1 =6
TwoColumnGrid crossAxisCellCount = 1*2*3=6/2 =3
ThreeColumnGrid crossAxisCellCount = 1*2*3=6/3 =2
We will get the result as attached image
Let’s check the complete code.
I hope this blog will help to make the different number of columns in different rows.
Happy Learning 🙂
Reference Links :
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.
Stathis Plakidas
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.