检索 Firebase 存储图像而不会出现 downloadurl 抖动

Retrieve Firebase storage image without getting downloadurl flutter

如何在不获取 downloadUrl 的情况下在 flutter 中检索 Firebase 存储图像并将其显示在一些图像兼容的小部件中。我不希望我的用户以任何方式看到下载 url,即使他们打开我的代码

如果您在应用中使用 FlutterFire 存储库,您可以调用 getData on a reference to the file to get its data. So with that you just need to know the path to the data, and you won't need the download URL in your application. Once you have the data locally, you can create an image out of it with:

与下载 URL 不同,对 getData() 的调用由安全规则检查,因此您必须确保允许用户访问该文件。