From 2f385828116bd2bf38a66c13a73f5172e6920e39 Mon Sep 17 00:00:00 2001 From: Adddison Date: Thu, 20 Jun 2024 11:09:18 +0800 Subject: [PATCH] 1.Fix parent widget error --- lib/pages/home/community.dart | 45 +++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/lib/pages/home/community.dart b/lib/pages/home/community.dart index 7d90313..e32c57b 100644 --- a/lib/pages/home/community.dart +++ b/lib/pages/home/community.dart @@ -22,7 +22,7 @@ class _CommunityState extends State { const SizedBox(height: 4), Text( label, - style: TextStyle(color: iconColor, fontSize: 12), + style: TextStyle(color: iconColor, fontSize: 9), ), ], ), @@ -48,25 +48,30 @@ class _CommunityState extends State { alignment: WrapAlignment.center, runSpacing: 8.0, children: [ - Expanded( - child: - buildCategoryButton(Icons.home, "FOR YOU", Colors.orange), - ), - Expanded( - child: buildCategoryButton( - Icons.check_box, "ENTHUSIASTS", Colors.green), - ), - Expanded( - child: buildCategoryButton( - Icons.person_add, "NEW USERS", Colors.red), - ), - Expanded( - child: - buildCategoryButton(Icons.people, "ACTIVE", Colors.green), - ), - Expanded( - child: buildCategoryButton( - Icons.visibility, "VISITORS", Colors.black), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: buildCategoryButton( + Icons.home, "FOR YOU", Colors.orange), + ), + Expanded( + child: buildCategoryButton( + Icons.check_box, "ENTHUSIASTS", Colors.green), + ), + Expanded( + child: buildCategoryButton( + Icons.person_add, "NEW USERS", Colors.red), + ), + Expanded( + child: buildCategoryButton( + Icons.people, "ACTIVE", Colors.green), + ), + Expanded( + child: buildCategoryButton( + Icons.visibility, "VISITORS", Colors.black), + ), + ], ), ], ),