![](/img/trans.png)
[英]While Opening a web-view in Flutter and Click on Drop-Down list got Crash
[英]Getting error while implementing web-view in flutter applications
我正在构建一个具有网络视图的颤振应用程序。 我已将 minsdkversion 更新为 20。并添加了使用互联网的 android 权限,但仍然出现错误。 点击这里查看错误
镖
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() {
runApp(
const MaterialApp(
home: WebViewApp(),
),
);
}
class WebViewApp extends StatefulWidget {
const WebViewApp({Key? key}) : super(key: key);
@override
State<WebViewApp> createState() => _WebViewAppState();
}
class _WebViewAppState extends State<WebViewApp> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter WebView'),
),
body: const WebView(
initialUrl: 'https://flutter.dev',
),
);
}
}
我将您的代码运行到我的机器上,它在 android 设备上运行良好。 我希望您在 android 或 ios 设备上运行您的应用程序,因为flutter_webview: any
版本仅支持 Android 和 ios 设备。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.