Browse Source

*started with taking safe areas into account

Matthew Clark 7 năm trước cách đây
mục cha
commit
2064b2c5a7
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  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);