From 2c4ee083ef4006b13927c3d2c569e3ef671068bd Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 1 Oct 2023 11:46:28 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E5=AA=92=E4=BD=93=E5=BA=93=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E5=A4=B9=E6=A0=B7=E5=BC=8F=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/media/view.dart | 72 ++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/lib/pages/media/view.dart b/lib/pages/media/view.dart index 03af2e36..c621c2dc 100644 --- a/lib/pages/media/view.dart +++ b/lib/pages/media/view.dart @@ -39,45 +39,47 @@ class _MediaPageState extends State Color primary = Theme.of(context).colorScheme.primary; return Scaffold( appBar: AppBar(toolbarHeight: 30), - body: Column( - children: [ - ListTile( - leading: null, - title: Padding( - padding: const EdgeInsets.only(left: 20), - child: Text( - '媒体库', - style: TextStyle( - fontSize: Theme.of(context).textTheme.titleLarge!.fontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - for (var i in mediaController.list) ...[ + body: SingleChildScrollView( + child: Column( + children: [ ListTile( - onTap: () => i['onTap'](), - dense: true, - leading: Padding( - padding: const EdgeInsets.only(left: 15), - child: Icon( - i['icon'], - color: primary, + leading: null, + title: Padding( + padding: const EdgeInsets.only(left: 20), + child: Text( + '媒体库', + style: TextStyle( + fontSize: Theme.of(context).textTheme.titleLarge!.fontSize, + fontWeight: FontWeight.bold, + ), ), ), - contentPadding: - const EdgeInsets.only(left: 15, top: 2, bottom: 2), - minLeadingWidth: 0, - title: Text( - i['title'], - style: const TextStyle(fontSize: 15), - ), ), + for (var i in mediaController.list) ...[ + ListTile( + onTap: () => i['onTap'](), + dense: true, + leading: Padding( + padding: const EdgeInsets.only(left: 15), + child: Icon( + i['icon'], + color: primary, + ), + ), + contentPadding: + const EdgeInsets.only(left: 15, top: 2, bottom: 2), + minLeadingWidth: 0, + title: Text( + i['title'], + style: const TextStyle(fontSize: 15), + ), + ), + ], + Obx(() => mediaController.userLogin.value + ? favFolder(mediaController, context) + : const SizedBox()) ], - Obx(() => mediaController.userLogin.value - ? favFolder(mediaController, context) - : const SizedBox()) - ], + ), ), ); } @@ -136,7 +138,7 @@ class _MediaPageState extends State // const SizedBox(height: 10), SizedBox( width: double.infinity, - height: 170 * MediaQuery.of(context).textScaleFactor, + height: 200 * MediaQuery.of(context).textScaleFactor, child: FutureBuilder( future: _futureBuilderFuture, builder: (context, snapshot) {