Comments (4)
I have found a work around for this issue of drawer get hidden behind WebviewScaffold.
Under this solution whenever I click on the drawer in appbar to open, I hide the webview reference. You can follow below steps
- make a new file named "mywebview.dart"
- copy the entire file "webview_scaffold.dart" and paste in mywebview.dart and modify name of the Classes to "MyWebScaffold" as you can't use "WebViewScaffold".
- Now in your code instead of using class "WebviewScaffold" use your class that you have made "MyWebScaffold"
- Now it is the time to use stream listeners to get to know when the drawer is open or close. Add some string eg. "open" to listener on init() method of your Drawer class and do the same in dispose() method of Drawer class, eg. "close"
- As soon as listener listen "open", you need to call this method "webviewReference.hide();" and in case of "close" call "webviewReference.show();". All these you need to do inside a listener in init() method of your MyWebScaffold class.
This way Drawer will never get hide behind webviewscaffold and your webview always keeps its state with it, even after drawer gets open.
from flutter_webview_plugin.
Hi,
Sorry but there is no clean way to do that,
The webview is not a "Flutter Widget", it is a native view on top of the flutter view, so you can draw flutter widgets on it (drawer or popup menu).
The only thing you could do, is to call resize
function when drawer is showing, or I could introduce an other function to completely hide the webview but the animation won't look clean and shiny.
That kind of feature is not possible due to Flutter, they are working on draw webview directly on the widget tree, I suggest you to follow this thread. (flutter/flutter#730)
from flutter_webview_plugin.
@lejard-h Thanks a lot.
from flutter_webview_plugin.
Hello,
I tried to launch the url within a rectangle.
flutterWebviewPlugin.launch(selectedUrl,
rect: rect,
userAgent: kAndroidUserAgent);
Now when the keyboard appears, I resize the rectangle
@override
void didChangeMetrics(){
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height-MediaQuery.of(context).viewInsets.bottom;
rect = new Rect.fromLTWH(0.0, 0.0, width, height);
flutterWebviewPlugin.resize(rect);
}
The rectangle is not resizing correctly to display the url.
from flutter_webview_plugin.
Related Issues (20)
- 使用flutter_webview_plugin dialog侧边划出控件均被webview遮住
- Is there anybody use FirebaseMessaging.onBackgroundMessage with javascript channel ?
- 在安卓13中报错,注释掉这个就可以了。 HOT 2
- Is it possible to load and display Three.js content in Flutter Web Application ?
- WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren't compatible with AndroidX. See https://goo.gl/CP92wY for more information on the problem and how to fix it. This warning prints for all Android build failures. The real root cause of the error may be unrelated. HOT 3
- 2222
- deprecated version
- IOS goes to live broadcast instead of camera on video recording
- Download File feature in webview is long overdue now
- this plugin is deprecated and use plugin migration HOT 8
- Build failed on Android Target SDK 33 HOT 1
- How to set user agent as Microsoft Edge ? HOT 1
- Not able to Import the package
- The iOS and Android execution returns are inconsistent
- Using WebviewScaffold to load URLs doesn't work in iOS
- Android webview error
- different roots error: :flutter_webview_plugin:compileDebugUnitTestSources
- deprecated version for flutter dart version 3
- Webview dont load for Android with new flutter version
- Remove references to deprecated v1 Android embedding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_webview_plugin.