0

Flutter & Dart : How to stack multiple videos in a Carousel Widget?

I am trying to stack a multiple videos in a Carousel Widget but I am only getting one(1) video since I just provide one video link in the VideoPlayerController.network.(). Is it possible to use a ArrayList of String or is there any best and easiest way to do it?

  Future<void> initializePlayer() async {

    videoPlayerController =    VideoPlayerController.network('http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4');
    await Future.wait([videoPlayerController.initialize()]);
    chewieController=ChewieController(
      videoPlayerController: videoPlayerController,
      autoPlay: true,
      looping: true,
      materialProgressColors: 
      ChewieProgressColors(
        playedColor: Colors.red,
        handleColor: Colors.white,
        backgroundColor: Colors.white,
        bufferedColor: Colors.grey
      ),
      placeholder: Container(color: Colors.black),
      autoInitialize: true,
    );
    update();
  }
chbxster
  • 1
  • 3

1 Answers1

0

Yes. Take Listview widget and implement below code in link

Carousel in flutter

Developer
  • 582
  • 1
  • 3
  • 12