flutter_webview_plugin icon indicating copy to clipboard operation
flutter_webview_plugin copied to clipboard

Flutter widget on top of webview

Open Sarthaktydy opened this issue 7 years ago • 17 comments

This is a feature that is missing when you're in the Webview you can't make a widget appear on top of it. please add this feature.

Sarthaktydy avatar Mar 06 '19 10:03 Sarthaktydy

Yes, please. I want to add a back button which is common throughout the App, but I am unable to place it on WebView.

I am using the WebView as a part of Stack.

Stack(
        children: <Widget>[
              WebView(initialUrl: widget.url,),
              WebviewScaffold(
                url: widget.url,
                headers: getHeaders(),
              ),
              AppBackButton(
                onWillPop: () {
                  Navigator.pop(context);
                },
              ),
            ],
          )

But I am not able to view this button over WebView :-1:

sakinaboriwala avatar Apr 18 '19 10:04 sakinaboriwala

Any updates?

Yodart avatar Apr 19 '19 22:04 Yodart

No updates but you can try flutter_webview instead, although there are some limitation to that webview also, it doesn't support calling storage for uploading document (My project on angular needs that).

Sarthaktydy avatar Apr 22 '19 05:04 Sarthaktydy

Yes, please. I want to add a back button which is common throughout the App, but I am unable to place it on WebView.

I am using the WebView as a part of Stack.

Stack(
        children: <Widget>[
              WebView(initialUrl: widget.url,),
              WebviewScaffold(
                url: widget.url,
                headers: getHeaders(),
              ),
              AppBackButton(
                onWillPop: () {
                  Navigator.pop(context);
                },
              ),
            ],
          )

But I am not able to view this button over WebView 👎

if you only want this functionality there is two way to do it, either make a close button on appbar or switch to the flutter_webview. I mentioned limitation of flutter_webview above.

Sarthaktydy avatar Apr 22 '19 05:04 Sarthaktydy

Yes, please. I want to add a back button which is common throughout the App, but I am unable to place it on WebView. I am using the WebView as a part of Stack.

Stack(
        children: <Widget>[
              WebView(initialUrl: widget.url,),
              WebviewScaffold(
                url: widget.url,
                headers: getHeaders(),
              ),
              AppBackButton(
                onWillPop: () {
                  Navigator.pop(context);
                },
              ),
            ],
          )

But I am not able to view this button over WebView -1

if you only want this functionality there is two way to do it, either make a close button on appbar or switch to the flutter_webview. I mentioned limitation of flutter_webview above.

I did make the close button on AppBar, but unfortunately the client doesn't find it user friendly because of the bar. Also, flutter_webview will not allow me to send headers, and that's really important to me, infact the main reason why I switched to this plugin.

sakinaboriwala avatar Apr 22 '19 13:04 sakinaboriwala

@Sarthaktydy I did make the close button on AppBar, but unfortunately the client doesn't find it user friendly because of the bar. Also, flutter_webview will not allow me to send headers, and that's really important to me, infact the main reason why I switched to this plugin.

sakinaboriwala avatar Apr 22 '19 13:04 sakinaboriwala

@Sarthaktydy I did make the close button on AppBar, but unfortunately the client doesn't find it user friendly because of the bar. Also, flutter_webview will not allow me to send headers, and that's really important to me, infact the main reason why I switched to this plugin.

Yeah ,so thing is I'm also stuck with my project since both of the webview has limitation, all we can do is raise issue on both of the webview and wait them to fix it or else creating whole thing into the flutter and ditch webview :(. I wrote multiple emails to webview_flutter developer team but no luck. try mailing them with issue you're facing along side the issue link.

also refer:- https://github.com/flutter/flutter/issues/30549

Sarthaktydy avatar Apr 23 '19 05:04 Sarthaktydy

@Sarthaktydy I did make the close button on AppBar, but unfortunately the client doesn't find it user friendly because of the bar. Also, flutter_webview will not allow me to send headers, and that's really important to me, infact the main reason why I switched to this plugin.

They've added header in last update try webview_flutter now. :)

Sarthaktydy avatar Apr 23 '19 05:04 Sarthaktydy

@Sarthaktydy Ohh that's great news!! I will check it out!

sakinaboriwala avatar Apr 23 '19 05:04 sakinaboriwala

@Sarthaktydy found a way to do it using Scaffold's FAB.

Scaffold(
      floatingActionButtonLocation: FloatingActionButtonLocation.startTop,
      floatingActionButton:  GestureDetector(
        child: Container(
          margin: EdgeInsets.only(top: calculateInsetsAndDesiredMarginHere(), left : sameForLeftSide())
          child: Icon(Icons.clear, color: Colors.black),
        ),
        onTap: ( ) => Navigator.pop(context),
      ),
     body: "your webview"

Skyyo avatar Oct 25 '19 06:10 Skyyo

This is probably out of scope of this project. We would like to provide basic webview functionality while official webview plugin is not ready.

charafau avatar Nov 14 '19 15:11 charafau

Same problem, can solve the problem now?

zhangxinagjunHJH avatar Aug 11 '20 01:08 zhangxinagjunHJH

same problem

ahmed-foulad20 avatar Nov 03 '20 14:11 ahmed-foulad20

same problem

mcmc2014 avatar Jun 03 '21 09:06 mcmc2014

same

tejpalSinghRathore avatar Jan 27 '22 12:01 tejpalSinghRathore

Yes, please. I want to add a back button which is common throughout the App, but I am unable to place it on WebView.

I am using the WebView as a part of Stack.

Stack(
        children: <Widget>[
              WebView(initialUrl: widget.url,),
              WebviewScaffold(
                url: widget.url,
                headers: getHeaders(),
              ),
              AppBackButton(
                onWillPop: () {
                  Navigator.pop(context);
                },
              ),
            ],
          )

But I am not able to view this button over WebView 👎

I think you can use webviewx instead webview and put the button on WebViewAware , this solution in the Documentation (https://pub.dev/packages/webviewx)

Alaa-Shaker avatar Feb 16 '22 03:02 Alaa-Shaker

still same problem

Binozo avatar Feb 16 '22 20:02 Binozo