Skip to content

Commit c03ac2a

Browse files
committed
dashboard aligned
1 parent ac0c488 commit c03ac2a

File tree

3 files changed

+52
-47
lines changed

3 files changed

+52
-47
lines changed

lib/ui/page/dashboard/dashboard_one.page.dart

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -80,52 +80,54 @@ class DashboardOnePage extends StatelessWidget {
8080
elevation: 2.0,
8181
child: Padding(
8282
padding: const EdgeInsets.all(8.0),
83-
child: Column(
84-
mainAxisAlignment: MainAxisAlignment.start,
85-
children: <Widget>[
86-
DashboardMenuRow(
87-
firstIcon: FontAwesomeIcons.solidUser,
88-
firstLabel: "Friends",
89-
firstIconCircleColor: Colors.blue,
90-
secondIcon: FontAwesomeIcons.userFriends,
91-
secondLabel: "Groups",
92-
secondIconCircleColor: Colors.orange,
93-
thirdIcon: FontAwesomeIcons.mapMarkerAlt,
94-
thirdLabel: "Nearby",
95-
thirdIconCircleColor: Colors.purple,
96-
fourthIcon: FontAwesomeIcons.locationArrow,
97-
fourthLabel: "Moment",
98-
fourthIconCircleColor: Colors.indigo,
99-
),
100-
DashboardMenuRow(
101-
firstIcon: FontAwesomeIcons.images,
102-
firstLabel: "Albums",
103-
firstIconCircleColor: Colors.red,
104-
secondIcon: FontAwesomeIcons.solidHeart,
105-
secondLabel: "Likes",
106-
secondIconCircleColor: Colors.teal,
107-
thirdIcon: FontAwesomeIcons.solidNewspaper,
108-
thirdLabel: "Articles",
109-
thirdIconCircleColor: Colors.lime,
110-
fourthIcon: FontAwesomeIcons.solidCommentDots,
111-
fourthLabel: "Reviews",
112-
fourthIconCircleColor: Colors.amber,
113-
),
114-
DashboardMenuRow(
115-
firstIcon: FontAwesomeIcons.footballBall,
116-
firstLabel: "Sports",
117-
firstIconCircleColor: Colors.cyan,
118-
secondIcon: FontAwesomeIcons.solidCreditCard,
119-
secondLabel: "Payment",
120-
secondIconCircleColor: Colors.redAccent,
121-
thirdIcon: FontAwesomeIcons.solidStar,
122-
thirdLabel: "Fav",
123-
thirdIconCircleColor: Colors.pink,
124-
fourthIcon: FontAwesomeIcons.wallet,
125-
fourthLabel: "Wallet",
126-
fourthIconCircleColor: Colors.brown,
127-
),
128-
],
83+
child: Center(
84+
child: Column(
85+
mainAxisAlignment: MainAxisAlignment.start,
86+
children: <Widget>[
87+
DashboardMenuRow(
88+
firstIcon: FontAwesomeIcons.solidUser,
89+
firstLabel: "Friends",
90+
firstIconCircleColor: Colors.blue,
91+
secondIcon: FontAwesomeIcons.userFriends,
92+
secondLabel: "Groups",
93+
secondIconCircleColor: Colors.orange,
94+
thirdIcon: FontAwesomeIcons.mapMarkerAlt,
95+
thirdLabel: "Nearby",
96+
thirdIconCircleColor: Colors.purple,
97+
fourthIcon: FontAwesomeIcons.locationArrow,
98+
fourthLabel: "Moment",
99+
fourthIconCircleColor: Colors.indigo,
100+
),
101+
DashboardMenuRow(
102+
firstIcon: FontAwesomeIcons.images,
103+
firstLabel: "Albums",
104+
firstIconCircleColor: Colors.red,
105+
secondIcon: FontAwesomeIcons.solidHeart,
106+
secondLabel: "Likes",
107+
secondIconCircleColor: Colors.teal,
108+
thirdIcon: FontAwesomeIcons.solidNewspaper,
109+
thirdLabel: "Articles",
110+
thirdIconCircleColor: Colors.lime,
111+
fourthIcon: FontAwesomeIcons.solidCommentDots,
112+
fourthLabel: "Reviews",
113+
fourthIconCircleColor: Colors.amber,
114+
),
115+
DashboardMenuRow(
116+
firstIcon: FontAwesomeIcons.footballBall,
117+
firstLabel: "Sports",
118+
firstIconCircleColor: Colors.cyan,
119+
secondIcon: FontAwesomeIcons.solidStar,
120+
secondLabel: "Fav",
121+
secondIconCircleColor: Colors.redAccent,
122+
thirdIcon: FontAwesomeIcons.blogger,
123+
thirdLabel: "Blogs",
124+
thirdIconCircleColor: Colors.pink,
125+
fourthIcon: FontAwesomeIcons.wallet,
126+
fourthLabel: "Wallet",
127+
fourthIconCircleColor: Colors.brown,
128+
),
129+
],
130+
),
129131
),
130132
),
131133
),

lib/ui/page/dashboard/dashboard_one/dashboard_menu_row.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class DashboardMenuRow extends StatelessWidget {
3535
return Padding(
3636
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 15.0),
3737
child: Row(
38-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
38+
mainAxisAlignment: MainAxisAlignment.spaceAround,
39+
mainAxisSize: MainAxisSize.max,
3940
children: <Widget>[
4041
LabelBelowIcon(
4142
icon: firstIcon,

lib/ui/widgets/label_below_icon.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class LabelBelowIcon extends StatelessWidget {
2424
onTap: () => onPressed,
2525
child: Column(
2626
mainAxisAlignment: MainAxisAlignment.center,
27+
crossAxisAlignment: CrossAxisAlignment.center,
2728
children: <Widget>[
2829
isCircleEnabled
2930
? CircleAvatar(
@@ -45,6 +46,7 @@ class LabelBelowIcon extends StatelessWidget {
4546
),
4647
Text(
4748
label,
49+
textAlign: TextAlign.center,
4850
style: TextStyle(fontFamily: UIData.ralewayFont),
4951
)
5052
],

0 commit comments

Comments
 (0)