Reputation: 12373
Good day all,
I am using Image.network to call images from a URL, as mentioned, they work perfectly on the emulator. But after running flutter build apk, and installing it on a device => the images don't load.
Container(
height: 300,
width: double.infinity,
child: Image.network(
selectedMeal16.imageUrl,
fit: BoxFit.cover,
),
where "imageUrl" is extracted from a list as a string and loaded into the above widget, such as follows:
Meal(
id: 'm4',
title: 'schnitzel',
affordability:
imageUrl:
'https://cdn.pixabay.com/photo/2018/03/31/19/29/schnitzel-3279045_1280.jpg',)
Are there certain parameters that should change while building the apk, such as network permissions? Because in a previous app, I had no problems rendering images on emulators & physical devices.
Thank you for your time and valuable input.
Upvotes: 1
Views: 659
Reputation: 12373
This was when I first started learning Flutter, but it was due back then that I was building a release APK that wasn't being signed and didn't have my SHA keys for the physical device added to the Firebase project, thus, it failed.
Upvotes: 0