Переглянути джерело

*started with taking safe areas into account

Matthew Clark 7 роки тому
батько
коміт
2064b2c5a7
1 змінених файлів з 4 додано та 1 видалено
  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);