Flutter shows blank screen for GridView/Listview in production build

天大地大妈咪最大 提交于 2021-01-29 17:52:23

问题


I created a simple flutter app which basically shows grid items. In debug mode, the grid items shows normally. However, in production mode, flutter just shows blank screen. I even implemented pull to refresh. Now, when I pull to refresh the page, it still doesn't show.

In debug mode, both emulator and real device works fine. I use the following code to build the app for Android:

flutter build apk --target-platform android-arm,android-arm64 --split-per-abi

Here's my code: https://github.com/SanjayBanjade/flutter-ecommerce


回答1:


Add Internet permission in your AndroidManifest.xml file :

<uses-permission android:name="android.permission.INTERNET"/>

https://github.com/SanjayBanjade/flutter-ecommerce/blob/master/android/app/src/main/AndroidManifest.xml



来源:https://stackoverflow.com/questions/58091005/flutter-shows-blank-screen-for-gridview-listview-in-production-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!