here is my code
class SettingsPage extends StatefulWidget {
const SettingsPage({Key? key}) : super(key: key);
@override
_SettingsPageState createState() => _SettingsPageState();
}
class _SettingsPageState extends State {
InAppWebViewController? webViewController;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Settings"),
),
body: InAppWebView(
initialUrlRequest: URLRequest(
url: WebUri("https://www.google.com"), // Using WebUri directly
),
onWebViewCreated: (controller) {
webViewController = controller;
},
),
);
}
}
2
Answers
Did you add the internet permission for android?
Make sure to add the internet permission
You should provide more detail like is it only happen on IOS or android but if you have this problem that web didn’t load on android device try this
add this to
dependency_override
inpubspec.yaml
or you can migrate
flutter_inappwebview
to newer version like 6.1.5 that im just migrate today and it work perfectly but if you really want to use 6.0.0 above method is what you have to do