flutter access internet storage code example
Example 1: internet permission in flutter
In the AndroidManifest.xml file located at android/app/src/main you need to add this permission inside the manifest tag.
<uses-permission android:name="android.permission.INTERNET"/>
Example 2: flutter check internet connection
import 'package:connectivity/connectivity.dart';
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
} else if (connectivityResult == ConnectivityResult.wifi) {
}