0% found this document useful (0 votes)
35 views1 page

Elitmus All Question

The document defines a StaggeredGridView widget with 7 tiles of varying sizes laid out in a staggered grid pattern. It sets properties like mainAxisSpacing, crossAxisSpacing and passes in 7 child MyItems widgets with image URLs as parameters to populate the grid.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Elitmus All Question

The document defines a StaggeredGridView widget with 7 tiles of varying sizes laid out in a staggered grid pattern. It sets properties like mainAxisSpacing, crossAxisSpacing and passes in 7 child MyItems widgets with image URLs as parameters to populate the grid.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

StaggeredGridView.

count(
scrollDirection:Axis.horizontal ,
staggeredTiles: [
StaggeredTile.extent(2, 130.0),
StaggeredTile.extent(1, 150.0),
StaggeredTile.extent(1, 150.0),
StaggeredTile.extent(1, 150.0),
StaggeredTile.extent(1, 150.0),
StaggeredTile.extent(2, 240.0),
StaggeredTile.extent(2, 120.0)
],
crossAxisCount: 2,
mainAxisSpacing: 12.0,
crossAxisSpacing: 12.0,
// padding:
// EdgeInsets.symmetric(horizontal: 16.0, vertical:
8.0),
children: <Widget>[
// MyItems(Colors.orange),
// MyItems(Colors.yellow),
// MyItems(Colors.lightBlue),
// MyItems(Colors.red),
// MyItems(Colors.green),
// MyItems(Colors.grey),
// MyItems(Colors.brown)
MyItems(
"https://images.pexels.com/photos/1894263/pexels-
photo-1894263.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
MyItems(
"https://images.pexels.com/photos/1907452/pexels-
photo-1907452.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
MyItems(
"https://images.pexels.com/photos/1895896/pexels-
photo-1895896.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
MyItems(
"https://images.pexels.com/photos/1905174/pexels-
photo-1905174.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
MyItems(
"https://images.pexels.com/photos/1904821/pexels-
photo-1904821.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
MyItems(
"https://images.pexels.com/photos/1854271/pexels-
photo-1854271.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
MyItems(
"https://images.pexels.com/photos/1902350/pexels-
photo-1902350.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500")
],
))

You might also like