显示从firebase到Flatter应用程序的图像

显示从firebase到Flatter应用程序的图像,firebase,flutter,firebase-realtime-database,dart,google-cloud-firestore,Firebase,Flutter,Firebase Realtime Database,Dart,Google Cloud Firestore,请告诉我,我想知道如何使用列表视图将firebase中存储的图像显示到我的颤振应用程序。请简单描述一下如何进行。例如,将从firebase向我的面包店应用程序显示面包店产品图像,并显示价格。要获取特定图像的url,请提供任何帮助: final ref = FirebaseStorage.instance.ref().child('nameofimage'); // no need of the file extension, just the name does the job var url

请告诉我,我想知道如何使用列表视图将firebase中存储的图像显示到我的颤振应用程序。请简单描述一下如何进行。例如,将从firebase向我的面包店应用程序显示面包店产品图像,并显示价格。要获取特定图像的url,请提供任何帮助:

final ref = FirebaseStorage.instance.ref().child('nameofimage');
// no need of the file extension, just the name does the job
var url = await ref.getDownloadURL();
print(url);
当您拥有URL时,您可以使用它:

Image.network(url);

这是示例代码谢谢我将实现它。您好,如果我有许多图像,我想在listview中显示它们,这可以吗?这应该可以。只需将图像的名称与将要加载的其他信息一起保存即可。