解决 应用列表高度问题

pull/1/head
张萌 3 years ago
parent 1f9ca3d723
commit f6127bbc2c

@ -35,7 +35,7 @@ class _AllApplicationNewPageState extends State<AllApplicationNewPage> {
case 3: case 3:
return ['服务浏览', '周边企业', '住房说明', '电子商务']; return ['服务浏览', '周边企业', '住房说明', '电子商务'];
case 4: case 4:
return ['智慧养老', '任务发布', '周边服务', '共享投屏']; return [ '任务发布', '周边服务', '共享投屏'];
case 5: case 5:
return ['自营商城', '邻家宠物', '共享停车', '二手市场']; return ['自营商城', '邻家宠物', '共享停车', '二手市场'];
default: default:
@ -59,9 +59,7 @@ class _AllApplicationNewPageState extends State<AllApplicationNewPage> {
Container _applicationTile(int index) { Container _applicationTile(int index) {
return Container( return Container(
width: 686.w, width: 686.w,
padding: EdgeInsets.symmetric( padding: EdgeInsets.only(top: 32.w),
vertical: 32.w,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(16.w)), color: Colors.white, borderRadius: BorderRadius.circular(16.w)),
child: Column( child: Column(
@ -77,11 +75,7 @@ class _AllApplicationNewPageState extends State<AllApplicationNewPage> {
.bold .bold
.make(), .make(),
), ),
ConstrainedBox( GridView.count(
constraints: BoxConstraints(
maxHeight: getApplications(index).length ~/ 4 * 140.w +
((getApplications(index).length - 4) ~/ 4 * 30.w)),
child: GridView.count(
shrinkWrap: true, shrinkWrap: true,
crossAxisCount: 4, crossAxisCount: 4,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -90,7 +84,6 @@ class _AllApplicationNewPageState extends State<AllApplicationNewPage> {
.map((e) => applicationItem(e)) .map((e) => applicationItem(e))
.toList(), .toList(),
), ),
),
], ],
), ),
); );

@ -31,7 +31,7 @@ import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.da
class ApplicationUtil { class ApplicationUtil {
ApplicationUtil( this.titles); ApplicationUtil( this.titles);
List<String> titles = []; final List<String> titles ;
List<AppElement> get elements { List<AppElement> get elements {
var list = <AppElement>[]; var list = <AppElement>[];

Loading…
Cancel
Save