Skip to content

Commit

Permalink
dashboard aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
iampawan committed Jun 26, 2018
1 parent ac0c488 commit c03ac2a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 47 deletions.
94 changes: 48 additions & 46 deletions lib/ui/page/dashboard/dashboard_one.page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,52 +80,54 @@ class DashboardOnePage extends StatelessWidget {
elevation: 2.0,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
DashboardMenuRow(
firstIcon: FontAwesomeIcons.solidUser,
firstLabel: "Friends",
firstIconCircleColor: Colors.blue,
secondIcon: FontAwesomeIcons.userFriends,
secondLabel: "Groups",
secondIconCircleColor: Colors.orange,
thirdIcon: FontAwesomeIcons.mapMarkerAlt,
thirdLabel: "Nearby",
thirdIconCircleColor: Colors.purple,
fourthIcon: FontAwesomeIcons.locationArrow,
fourthLabel: "Moment",
fourthIconCircleColor: Colors.indigo,
),
DashboardMenuRow(
firstIcon: FontAwesomeIcons.images,
firstLabel: "Albums",
firstIconCircleColor: Colors.red,
secondIcon: FontAwesomeIcons.solidHeart,
secondLabel: "Likes",
secondIconCircleColor: Colors.teal,
thirdIcon: FontAwesomeIcons.solidNewspaper,
thirdLabel: "Articles",
thirdIconCircleColor: Colors.lime,
fourthIcon: FontAwesomeIcons.solidCommentDots,
fourthLabel: "Reviews",
fourthIconCircleColor: Colors.amber,
),
DashboardMenuRow(
firstIcon: FontAwesomeIcons.footballBall,
firstLabel: "Sports",
firstIconCircleColor: Colors.cyan,
secondIcon: FontAwesomeIcons.solidCreditCard,
secondLabel: "Payment",
secondIconCircleColor: Colors.redAccent,
thirdIcon: FontAwesomeIcons.solidStar,
thirdLabel: "Fav",
thirdIconCircleColor: Colors.pink,
fourthIcon: FontAwesomeIcons.wallet,
fourthLabel: "Wallet",
fourthIconCircleColor: Colors.brown,
),
],
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
DashboardMenuRow(
firstIcon: FontAwesomeIcons.solidUser,
firstLabel: "Friends",
firstIconCircleColor: Colors.blue,
secondIcon: FontAwesomeIcons.userFriends,
secondLabel: "Groups",
secondIconCircleColor: Colors.orange,
thirdIcon: FontAwesomeIcons.mapMarkerAlt,
thirdLabel: "Nearby",
thirdIconCircleColor: Colors.purple,
fourthIcon: FontAwesomeIcons.locationArrow,
fourthLabel: "Moment",
fourthIconCircleColor: Colors.indigo,
),
DashboardMenuRow(
firstIcon: FontAwesomeIcons.images,
firstLabel: "Albums",
firstIconCircleColor: Colors.red,
secondIcon: FontAwesomeIcons.solidHeart,
secondLabel: "Likes",
secondIconCircleColor: Colors.teal,
thirdIcon: FontAwesomeIcons.solidNewspaper,
thirdLabel: "Articles",
thirdIconCircleColor: Colors.lime,
fourthIcon: FontAwesomeIcons.solidCommentDots,
fourthLabel: "Reviews",
fourthIconCircleColor: Colors.amber,
),
DashboardMenuRow(
firstIcon: FontAwesomeIcons.footballBall,
firstLabel: "Sports",
firstIconCircleColor: Colors.cyan,
secondIcon: FontAwesomeIcons.solidStar,
secondLabel: "Fav",
secondIconCircleColor: Colors.redAccent,
thirdIcon: FontAwesomeIcons.blogger,
thirdLabel: "Blogs",
thirdIconCircleColor: Colors.pink,
fourthIcon: FontAwesomeIcons.wallet,
fourthLabel: "Wallet",
fourthIconCircleColor: Colors.brown,
),
],
),
),
),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/page/dashboard/dashboard_one/dashboard_menu_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class DashboardMenuRow extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 15.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceAround,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
LabelBelowIcon(
icon: firstIcon,
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/widgets/label_below_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class LabelBelowIcon extends StatelessWidget {
onTap: () => onPressed,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
isCircleEnabled
? CircleAvatar(
Expand All @@ -45,6 +46,7 @@ class LabelBelowIcon extends StatelessWidget {
),
Text(
label,
textAlign: TextAlign.center,
style: TextStyle(fontFamily: UIData.ralewayFont),
)
],
Expand Down

0 comments on commit c03ac2a

Please sign in to comment.