I'm using web view flutter 3.0.0 and it doesn't want to accept any thing for the ( on Web View Created ) .. .. so please if someone can solve ill be thankful
I'm using web view flutter 3.0.0 and it doesn't want to accept any thing for the ( on Web View Created ) .. .. so please if someone can solve ill be thankful
android {
defaultConfig {
minSdkVersion 19
}
}
Using Virtual displays
Set the correct minSdkVersion in android/app/build.gradle (if it was previously lower than 20):
android {
defaultConfig {
minSdkVersion 20
}
}
Set WebView.platform = AndroidWebView(); in initState(). For example:
import 'dart:io';
import 'package:webview_flutter/webview_flutter.dart';
class WebViewExample extends StatefulWidget {
@override
WebViewExampleState createState() => WebViewExampleState();
}
class WebViewExampleState extends State<WebViewExample> {
@override
void initState() {
super.initState();
// Enable virtual display.
if (Platform.isAndroid) WebView.platform = AndroidWebView();
}
@override
Widget build(BuildContext context) {
return WebView(
initialUrl: 'https://flutter.dev',
);
}
}