I want to display the images with index through the urls stored in Firebase firestore, I am getting the images stored in cloud storage but I don't know how to get the url stored in firebase firestore which is in array. pls help me out as I am only a beginner and learning through internet. Image attached below.
Thanks in advance.
List<String> urls = []; @override void initState() { super.initState(); _getImages(); } This is the container where images are displaying through urls stored in cloud storage.
Container( height: 160.0, padding: EdgeInsets.symmetric(vertical: 15.0,horizontal: 15.0), child: CustomScrollView( physics: const BouncingScrollPhysics(), slivers: <Widget>[ SliverPadding( padding: const EdgeInsets.all(10), sliver: _buildContent(urls), ) ], ), ), This is method through which I am getting the images stored in cloud storage.
_getImages() async { ListResult _result = await _stoarge.ref().child("images").list(ListOptions(maxResults: 10)); _result.items.forEach((_ref) async { String _u = await _ref.getDownloadURL(); urls.add(_u); setState(() { print(urls.length); print(urls); }); }); }