Whenever I try to do an http call after about 20 seconds I get in the console the following error:
E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(1
Check if the wifi is connected or not. Mine worked after restarting the wifi.
The problem is basically coming when device is trying to access any internet resources,to fix add the to AndroidManifest.xml file @android/app/src location.
Double-check / make sure you have
<uses-permission android:name="android.permission.INTERNET" />
in your app's android/app/src/main/AndroidManifest.xml
Had the same issue. Added uses-permission android:name="android.permission.INTERNET" to "android/app/src/main/AndroidManifest.xml". Still couldn't work, then I quit and restarted the emulator, then it worked.
Go for AVD manager, then choose your emulator, on Actions menu click down option sign, then choose wipe data, then restart your emulator. It works for me.
Even after adding
<uses-permission android:name="android.permission.INTERNET"/>
in your android/app/src/main/AndroidManifest.xml, if you're still finding trouble then
There maybe an error with the website's server IP address like:
Server IP address could not be found
It's better to wait for some time and make sure to restart wifi, it worked for me.