i Just need to create some thing like this and it’s scrollable to horizontal there is another set this available when we scroll to right i just did like this but not worked i hope i did something that’s not right
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ImageSlideshow(
width: double.infinity,
height: mHeight * 0.5,
initialPage: 0,
indicatorColor: Colors.grey,
indicatorBackgroundColor: Colors.white,
autoPlayInterval: 1500,
isLoop: true,
children: [
Image.network(
'https://images.unsplash.com/photo-1597734187998-e1931acfe2ed?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8bWFzamlkfGVufDB8fDB8fA%3D%3D&w=1000&q=80',
fit: BoxFit.cover,
),
Image.network(
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTPXlJihD-aeeSlMpTx8NV2rwkPzqw5UANQLHfCv0nmC0sQkCRkrSe6fXHSqjV2wm8NgA8&usqp=CAU',
fit: BoxFit.cover,
),
],
),
MSalahTime(mHeight: mHeight),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
)
Expanded(
child: GridView.count(
scrollDirection: Axis.horizontal,
children: List<Widget>.generate(
6,
(counter) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: mWidth * 0.3,
decoration: BoxDecoration(
color: Colors.red,
),
),
),
),
),
)
],
),
2
Answers
You need to provide
crossAxisCount:n
, based on your ui n will be 3. But it will 2 beingAxis.horizontal
More about using
GridView
you need to put your
gridview
inside thepageview
so you can swipe right or left with page indicator