Browse Source

修复左侧导航栏高度适应问题

Melon 1 year ago
parent
commit
c172657378
2 changed files with 21 additions and 32 deletions
  1. 0 15
      .metadata
  2. 21 17
      lib/pages/home/view.dart

+ 0 - 15
.metadata

@@ -18,21 +18,6 @@ migration:
     - platform: android
       create_revision: e285328a6909879584a27c9b8eec5fa3621ead93
       base_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-    - platform: ios
-      create_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-      base_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-    - platform: linux
-      create_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-      base_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-    - platform: macos
-      create_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-      base_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-    - platform: web
-      create_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-      base_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-    - platform: windows
-      create_revision: e285328a6909879584a27c9b8eec5fa3621ead93
-      base_revision: e285328a6909879584a27c9b8eec5fa3621ead93
 
   # User provided section
 

+ 21 - 17
lib/pages/home/view.dart

@@ -17,24 +17,28 @@ class HomePage extends GetView<HomeController> {
       right: false,
       left: false,
       // maintainBottomViewPadding: true,
-      child: Scaffold(
-        // resizeToAvoidBottomInset: false,
-        backgroundColor: const Color.fromRGBO(238, 238, 238, 1),
-        body: Column(
-          mainAxisSize: MainAxisSize.max,
-          children: [
-            SizedBox(
-              height: 90,
-              child: _buildHeader(),
-            ),
-            const SizedBox(height: 2),
-            // Expanded(child: _buildBody(context)),
-            SizedBox(
-              height: MediaQuery.of(context).size.height - 90 - 2,
-              child: _buildBody(context),
+      child: LayoutBuilder(
+        builder: (context, c) {
+          return Scaffold(
+            // resizeToAvoidBottomInset: false,
+            backgroundColor: const Color.fromRGBO(238, 238, 238, 1),
+            body: Column(
+              mainAxisSize: MainAxisSize.max,
+              children: [
+                SizedBox(
+                  height: 90,
+                  child: _buildHeader(),
+                ),
+                const SizedBox(height: 2),
+                // Expanded(child: _buildBody(context)),
+                SizedBox(
+                  height: c.maxHeight - 90 - 2,
+                  child: _buildBody(context),
+                ),
+              ],
             ),
-          ],
-        ),
+          );
+        },
       ),
     );
   }