Kosmo Club
Β Β·Β Software Developer

Use images from assets dynamically

I have a number of icons stored locally in assets (static) that I want to show on a ListView, which is populated based on the data fetched from the Firebase. The name of the icon comes with the data from Firebase, but the actual icon is stored locally in the assets.
The issue is that I cannot use the dynamic name of the icon when I select the image source as an asset.

I am thinking of not putting load on the network to load those icons. I believe it will slow down the flow of data over the API.

In the past, I did that, but due to some issues, I was not able to fetch images from the Firebase. It was all fine in the Flutter flow test mode, but when I deployed the app on a real mobile phone via Google internal testing, the icons from the Firebase were not displaying. I did some research and found some threads that say it is a Firebase security rules setting. I need to learn all these. I think the easiest solution is to just use locally stored icons instead of those from the firebase.

8
7 replies