I am trying to position my text on top of my Carousel Slider using Stack and Positioned Widget but it was staying on top of the Carousel, is there a way I can go about it.
body: ListView(
shrinkWrap: true,
children: [
Stack(
alignment: Alignment.center,
children: [
Positioned(
child: Text('TOP OFFERS / DISCOUNT'))
],
),
Container(
height: 150,
width: double.infinity,
color: HexColor("ffa400"),
child:
// Column(
// children: [
CarouselSlider.builder(
options: CarouselOptions(
height: 140,
autoPlay: true,
viewportFraction: 0.8,
enlargeCenterPage: true,
onPageChanged: (index, reason) {
setState(() {
activeIndex = index;
});
}),
itemCount: firstImages.length,
itemBuilder: (context, index, realIndex) {
final firstImage = firstImages[index];
return Column(
children: [
Expanded(child: buildImage(firstImage, index)),
buildIndicator(),
],
);
},
),