-
Notifications
You must be signed in to change notification settings - Fork 939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This plugin isn't working in flutter web. After launching the webview the spinner keeps on spinning with no errors. #668
Comments
Same problem :( |
Same issue here. These are the exceptions I get in the developer console:
|
I switched to use an alternative approach and now just launch a new tab using url_launcher on web. |
My use case is to provide additional features on top of the web view, so this alternative approach doesn't work for me @dazza5000. If anybody figures out any other way, I'll be obliged :) |
I build my own small plugin what implements this and on start it checks kIsWeb constant (comes from Flutter) and if its false, I use this plugin. However if it's true, I'm on Flutter Web and I can build some other way to manage what I'm trying to do. From what I gather, web isn't implemented. Web required registerWith function for a plugin. I think this really is a missing feature...however, this creates a webview for Android and iOS. What would that actually be on a browser? Iframe? Container with HTML content inside it? Would be handy to have something like this implemented. Works very well for OAUTH2 login for example. |
I think iframeelement might be an acceptable web approach |
Hi guys! I'm really interested to help on this. @villematti do you have any update about your work? |
@ach4m0 Nothing progressive really. I ended up using that kIsWeb variable and that does work well enough in my current project. I'm planing on getting back to this when I have more time. |
Hi , I need this to be fixed also. Stucked. PLEASE HELP, PLEASE FIX THIS .........thank You |
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
String url = "https://google.com/";
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Webview Example',
theme: ThemeData.dark(),
routes: {
"/": () => Home(),
"/webview": () => WebviewScaffold(
url: url,
appBar: AppBar(
title: Text("WebView"),
),
withJavascript: true,
withLocalStorage: true,
withZoom: true,
)
},
);
}
}
class Home extends StatefulWidget {
@OverRide
HomeState createState() => HomeState();
}
class HomeState extends State {
final webView = FlutterWebviewPlugin();
TextEditingController controller = TextEditingController(text: url);
@OverRide
void initState() {
super.initState();
}
@OverRide
void dispose() {
webView.dispose();
controller.dispose();
super.dispose();
}
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("WebView"),
),
body: Center(
child: Column(
children: [
Container(
padding: EdgeInsets.all(10.0),
child: TextField(
controller: controller,
),
),
RaisedButton(
child: Text("Open Webview"),
onPressed: () {
Navigator.of(context).pushNamed("/webview");
},
)
],
),
));
}
}
The text was updated successfully, but these errors were encountered: