So I installed the plugin (https://pub.dev/packages/webview_flutter#-readme-tab-) added the following to my info.plist. I installed the latest version to my pubspec.yaml
<key>io.flutter.embedded_views_preview</key>
<true/>
Imported it to my view page.
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class Start extends StatelessWidget {
final mywebdesk2 = const Color(0xFF00BCD4);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: mywebdesk2,
title: Text(
'MY WEB DESK',
style: TextStyle(
fontWeight: FontWeight.bold
),
),
elevation: 0.0,
),
resizeToAvoidBottomInset: false,
body: SafeArea(
child: Container(
child:WebView(
initialUrl: 'https://www.google.com',
javascriptMode: JavascriptMode.unrestricted,
)
)
),
);
}
}
It will run in the simulator but not on the iPhone. I have have run flutter doctor and no issues there
When I run it in Xcode to build to an actual iPhone I get the following
Any help is much appreciated
Aucun commentaire:
Enregistrer un commentaire