Procházet zdrojové kódy

*started with taking safe areas into account

Matthew Clark před 7 roky
rodič
revize
2064b2c5a7
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      lib/src/webview_scaffold.dart

+ 4 - 1
lib/src/webview_scaffold.dart

@@ -98,12 +98,15 @@ class _WebviewScaffoldState extends State<WebviewScaffold> {
 
     if (widget.bottomNavigationBar != null) {
       height -=
-          56.0; // todo(lejard_h) find a way to determine bottomNavigationBar programmatically
+          56.0 + mediaQuery.padding.bottom; // todo(lejard_h) find a way to determine bottomNavigationBar programmatically
     }
 
     if (widget.persistentFooterButtons != null) {
       height -=
           53.0; // todo(lejard_h) find a way to determine persistentFooterButtons programmatically
+      if (widget.bottomNavigationBar == null){
+         height -= mediaQuery.padding.bottom;
+      }
     }
 
     return new Rect.fromLTWH(0.0, top, mediaQuery.size.width, height);