hi guys.
i want to build something like subtitle and everything is ok but there is a problem about width
i take a list from api and maybe text is too long or too short but page width does not change by text length and cause some empty spaces or overflow
List test = ['test a', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna', ''Lorem ipsum dolor sit amet, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna'];
hi guys. i want to build something like subtitle and everything is ok but there is a problem about width i take a list from api and maybe text is too long or too short but page width does not change by text length and cause some empty spaces or overflow
List test = ['test a', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna', ''Lorem ipsum dolor sit amet, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna'];
CarouselSlider( items: test.map((i) { return Builder( builder: (BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.end, children: [ Text(i), Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: Container( height: 20, width: 2, color: primary1, ), ) ], ); }, ); }).toList(), options: CarouselOptions( height: 200, aspectRatio: 2, animateToClosest: true, initialPage: 0, pauseAutoPlayOnManualNavigate: false, enableInfiniteScroll: true, reverse: false, autoPlay: true, autoPlayInterval: const Duration(milliseconds: 100), autoPlayAnimationDuration: const Duration(seconds: 20), autoPlayCurve: Curves.linear, enlargeCenterPage: false, padEnds: false, pageSnapping: true, enlargeFactor: 0, scrollDirection: Axis.horizontal, ), ),
this is my code but preview is not consistent and it has empty space or overflow plz help me with my problem