From f6127bbc2c674470a20da842251a32c3b800ddb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Tue, 24 May 2022 18:33:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=AB=98=E5=BA=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/application/all_application_new.dart | 27 +++++++------------ lib/utils/application_utils.dart | 4 +-- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/lib/ui/home/application/all_application_new.dart b/lib/ui/home/application/all_application_new.dart index 0a5ec6af..eaac0a4a 100644 --- a/lib/ui/home/application/all_application_new.dart +++ b/lib/ui/home/application/all_application_new.dart @@ -35,7 +35,7 @@ class _AllApplicationNewPageState extends State { case 3: return ['服务浏览', '周边企业', '住房说明', '电子商务']; case 4: - return ['智慧养老', '任务发布', '周边服务', '共享投屏']; + return [ '任务发布', '周边服务', '共享投屏']; case 5: return ['自营商城', '邻家宠物', '共享停车', '二手市场']; default: @@ -59,9 +59,7 @@ class _AllApplicationNewPageState extends State { Container _applicationTile(int index) { return Container( width: 686.w, - padding: EdgeInsets.symmetric( - vertical: 32.w, - ), + padding: EdgeInsets.only(top: 32.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(16.w)), child: Column( @@ -77,19 +75,14 @@ class _AllApplicationNewPageState extends State { .bold .make(), ), - ConstrainedBox( - constraints: BoxConstraints( - maxHeight: getApplications(index).length ~/ 4 * 140.w + - ((getApplications(index).length - 4) ~/ 4 * 30.w)), - child: GridView.count( - shrinkWrap: true, - crossAxisCount: 4, - physics: NeverScrollableScrollPhysics(), - children: ApplicationUtil(getApplications(index)) - .elements - .map((e) => applicationItem(e)) - .toList(), - ), + GridView.count( + shrinkWrap: true, + crossAxisCount: 4, + physics: NeverScrollableScrollPhysics(), + children: ApplicationUtil(getApplications(index)) + .elements + .map((e) => applicationItem(e)) + .toList(), ), ], ), diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart index 98ce55f0..46e23b8f 100644 --- a/lib/utils/application_utils.dart +++ b/lib/utils/application_utils.dart @@ -29,9 +29,9 @@ import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.dart'; class ApplicationUtil { - ApplicationUtil(this.titles); + ApplicationUtil( this.titles); - List titles = []; + final List titles ; List get elements { var list = [];