List<File> _video = []; @override Widget build(BuildContext context) { return Scaffold( body: Column(children: [ ElevatedButton( onPressed: () { chooseVideo(); print(_video); }, child: const Text( 'choose', style: TextStyle(color: Colors.black), )), Expanded( child: ListView.builder( shrinkWrap: true, itemCount: _video.length, itemBuilder: (ctx, index) { INvideoPlayerController = VideoPlayerController.file(_video[index]) ..setLooping(true) ..initialize() .then((value) => INvideoPlayerController!.play()); print(_video); return _video.isEmpty ? Container() : AspectRatio( aspectRatio: INvideoPlayerController!.value.aspectRatio, child: VideoPlayer(INvideoPlayerController!), ); }), ), ]), );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)