This plugin isn't working in flutter web. After launching the webview the spinner keeps on spinning with no errors.
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
@override void initState() { super.initState();
webView.close();
controller.addListener(() {
url = controller.text;
});
}
@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:
Same problem :(
Same issue here.
These are the exceptions I get in the developer console:
Overflow on channel: flutter_webview_plugin. Messages on this channel are being discarded in FIFO fashion. The engine may not be running or you need to adjust the buffer size if of the channel.
errors.dart:147 Uncaught (in promise) Error: MissingPluginException(No implementation found for method launch on channel flutter_webview_plugin)
at Object.throw_ [as throw] (errors.dart:196)
at MethodChannel._invokeMethod (platform_channel.dart:154)
at _invokeMethod.next (<anonymous>)
at onValue (async_patch.dart:47)
at _RootZone.runUnary (zone.dart:1381)
at _FutureListener.thenAwait.handleValue (future_impl.dart:140)
at handleValueCallback (future_impl.dart:682)
at Function._propagateToListeners (future_impl.dart:711)
at _Future.new.[_completeWithValue] (future_impl.dart:526)
at async._AsyncCallbackEntry.new.callback (future_impl.dart:556)
at Object._microtaskLoop (schedule_microtask.dart:43)
at _startMicrotaskLoop (schedule_microtask.dart:52)
at async_patch.dart:168
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