Your example is working perfectly but I want to show progress in list view builder with loading controller.value for that index how can we do this.
my working code without animation
Map<int, double> fileDownloadProgress = {};
ListView.builder(
itemCount: doc.getDocument.length + 1,
physics: const BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (ctx, index) {
progress = downloadProgress[index];
if (index == 0) {
return InkWell(
onTap: () => _getUserSelfie(index),
child: DocumentsWidget(
fileName:
AppLocalizations.of(context)!.upload_selfie,
percentage: progress,
),
);
} else {
fileProgress = fileDownloadProgress[index - 1];
return GestureDetector(
onTap: () => _showBottomFilePicker(index - 1, doc),
child: DocumentsWidget(
fileName: doc.docData[index - 1].name,
percentage: fileProgress,
),
);
}
},
),
on upload Image method
var percentage = byteCount / totalByteLength * 100;
loadingController.forward();
setState(() {
valuePercentage = percentage / 100;
fileDownloadProgress[i] = valuePercentage;
debugPrint('downloadProgress => ${fileDownloadProgress[i]}');
});