Center(
child: Container(
height: height * 0.3,
width: width * 0.8,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
),
child: ImageSlideshow(
indicatorColor: HexColor('#FFA300'),
onPageChanged: (value) {},
autoPlayInterval: 3000,
isLoop: true,
children: [
Image.asset(
'assets/images/sample1.png',
fit: BoxFit.cover,
),
Image.asset(
'assets/images/sample2.png',
fit: BoxFit.cover,
),
Image.asset(
'assets/images/board3.jpeg',
fit: BoxFit.cover,
),
],
),
),
),
- this is code for the ImageSlideshow widget. I need assistance please?
- the normal way was use a container in a container but this one seems off
2
Answers
I wrapped the ImageSlideshow widget with a Stack widget and used a Row in a Container then used alignment property to assign the position of the Row
this should solve it
I can’t see an image in your question, but taking a look at your code and assuming you’re using the flutter_image_slideshow package on pub.dev. You can display the images and an icon as part of one ‘slide’ using a Stack widget.
Here’s an example where the first slide has the Icon on top of the image, but the others don’t demonstrating that the ImageSlideshow accepts any widgets as children.
Hope that helps.