0

I have a carousel that slides with texts and Images. I want to move Left and Right but this code moves up and down. It only Moves Up And Down ,But I Want the Slider to move Left and Right

StreamBuilder(
    stream: offer.snapshots(),
    builder: (context, AsyncSnapshot<QuerySnapshot> streamSnapshot) {
      if (streamSnapshot.hasData) {
        QuerySnapshot<Object?>? querySnapshot = streamSnapshot.data;
        List<QueryDocumentSnapshot> documents = querySnapshot!.docs;
        List<Map> items = documents.map((e) => {
          "id": e.id,
          "Product Name": e['Product Name'],
          "Company Name": e['Company Name'],
          }).toList();
        return PageView.builder(
            itemCount: items.length,
            itemBuilder: (context, index) {
              Map thisitem = items[index];
              return CarouselSlider(
                items: [
SizedBox(
    height:60,
    width:80,child: Image.network("${thisitem["Image"]}")),

const SizedBox(width: 40,),
Row(
  children: [
    Text('${thisitem['Company Name']}\n '
        '${thisitem['Product Name']}'
    ),],),

options: CarouselOptions( scrollDirection: Axis.horizontal, initialPage: 0, reverse: false, autoPlayCurve: Curves.fastOutSlowIn, height:140.0, enlargeCenterPage: true, autoPlay: false, aspectRatio: 16 / 9, autoPlayAnimationDuration: const Duration(milliseconds: 800), viewportFraction: 0.9, ), ); } ); }

zahra shahrouzi
  • 862
  • 7
  • 18

0 Answers0