Flutter & Dart:如何在 Carousel Widget 中堆叠多个视频?
我试图在 Carousel Widget 中堆叠多个视频,但我只得到一 (1) 个视频,因为我只在 VideoPlayerController.network.() 中提供了一个视频链接。是否可以使用 String 的 ArrayList 或者是否有最好和最简单的方法来做到这一点?
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();
}