[英]cached notwork image is working fine in debug mode but showing place holder in release mode flutter ,any solution please?
CachedNetworkImage(
imageUrl:
snapshot.data[index].cat_image,
imageBuilder:
(context, imageProvider) =>
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
),
placeholder: (context, url) => Center(
child:
CircularProgressIndicator()),
errorWidget: (context, url, error) =>
Center(child: Icon(Icons.error)),
),
i am getting image link from server in future builder and cached notwork image is working fine in debug mode but showing place holder in release mode我在未来的构建器中从服务器获取图像链接,缓存的 notwork 图像在调试模式下工作正常,但在发布模式下显示占位符
It's a issue that your app can't access internet.这是您的应用无法访问互联网的问题。 Go to Android>app>src>main>AndroidManifest.xml and add this line in AndroidManifest.xml:
Go 到 Android>app>src>main>AndroidManifest.xml 并在 AndroidManifest.xml 中添加这一行:
<uses-permission android:name="android.permission.INTERNET"/>
It'll solve the issue.它会解决问题。 Thanks
谢谢
If it doesn't work.如果它不起作用。 Try this.
尝试这个。
Add this to your android/app/build.gradle file:将此添加到您的 android/app/build.gradle 文件中:
android {
...
buildTypes {
release {
...
shrinkResources false
minifyEnabled false
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.