From dff6c25031a05c04c7a0ab3b2f7516c00f4e6b37 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 9 Aug 2020 18:14:59 +0300 Subject: [PATCH] add improvement dashboard screen design --- lib/screens/dashboard_screen.dart | 197 ++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 67 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 0c331b57..d3b1cd0f 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -222,8 +222,10 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ + Divider(), Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.only( + top: 8.0, bottom: 8, right: 40, left: 8), child: CircularPercentIndicator( radius: 100, animation: true, @@ -234,14 +236,17 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ AppText("38", - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 4), + fontSize: + SizeConfig.textMultiplier * 3.7, + color: Hexcolor('#5D4C35'), + fontWeight: FontWeight.bold,), AppText(TranslationBase .of(context) .outPatients, fontWeight: FontWeight.normal, fontSize: SizeConfig.textMultiplier * 1.4, - color: Colors.grey[800]), + color: Hexcolor('#5D4C35'), + ), ], ), circularStrokeCap: CircularStrokeCap.butt, @@ -249,68 +254,121 @@ class _DashboardScreenState extends State { progressColor: Hexcolor('#B8382C'), ), ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(12.0), - child: Row( - children: [ - Column( + Container( + child: Table( + defaultColumnWidth: FixedColumnWidth( + MediaQuery.of(context).size.width / 5), +// border: TableBorder.all( +// color: Colors.black26, +// width: 1, +// style: BorderStyle.solid), + border: TableBorder.symmetric( + inside: BorderSide( + width: 0.5, + color: Hexcolor('#5D4C35'), + ), + ), + children: [ + TableRow( + children: [ + TableCell( + child: Center( + child: Column( + children: [ + AppText( + TranslationBase.of(context).arrived, + fontSize: + SizeConfig.textMultiplier * 1.5, + color: Hexcolor('#5D4C35'), + ), + AppText( + "23", + fontSize: + SizeConfig.textMultiplier * 2.7, + color: Hexcolor('#5D4C35'), + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 6, + ), + ], + ), + )), + TableCell( + child: Column( + children: [ + AppText( + TranslationBase.of(context).er, + fontSize: + SizeConfig.textMultiplier * 1.5, + color: Hexcolor('#5D4C35'), + ), + AppText( + "03", + fontSize: + SizeConfig.textMultiplier * 2.7, + color: Hexcolor('#5D4C35'), + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 6, + ), + ], + ), + ), + ], +// + ), + TableRow(children: [ + TableCell( + child: Column( children: [ - Column( - children: [ - Text(TranslationBase - .of(context) - .arrived), - Text("23"), - ], - ), SizedBox( - height: 12, + height: 6, ), - Column( - children: [ - Text(TranslationBase - .of(context) - .notArrived), - Text("23"), - ], + AppText( + TranslationBase.of(context).notArrived, + fontSize: + SizeConfig.textMultiplier * 1.5, + color: Hexcolor('#5D4C35'), + ), + AppText( + "15", + fontSize: + SizeConfig.textMultiplier * 2.7, + color: Hexcolor('#5D4C35'), + fontWeight: FontWeight.bold, ), ], ), - SizedBox( - width: 12, - height: 33, - ), - Column( + ), + TableCell( + child: Column( children: [ - Column( - children: [ - Text(TranslationBase - .of(context) - .er), - Text("23"), - ], - ), SizedBox( - height: 12, + height: 6, ), - Column( - children: [ - Text(TranslationBase - .of(context) - .walkIn), - Text("23"), - ], + AppText( + TranslationBase.of(context).walkIn, + fontSize: + SizeConfig.textMultiplier * 1.5, + color: Hexcolor('#5D4C35'), + ), + AppText( + "04", + fontSize: + SizeConfig.textMultiplier * 2.7, + color: Hexcolor('#5D4C35'), + fontWeight: FontWeight.bold, ), ], - ) - ], - ), - ) - ], - ) + ), + ), + ]), + ], + ), + ), + Divider(), ], ), ), @@ -796,17 +854,21 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ CupertinoButton( - child: Text(TranslationBase.of(context).cancel - // style: TextStyle(context) - ), + child: AppText(TranslationBase + .of(context) + .cancel + // style: TextStyle(context) + ), onPressed: () { Navigator.pop(context); }, ), CupertinoButton( - child: Text(TranslationBase.of(context).done - // style: textStyle(context), - ), + child: AppText(TranslationBase + .of(context) + .done + // style: textStyle(context), + ), onPressed: () { Navigator.pop(context); // onSelectFun(cupertinoPickerIndex); @@ -825,12 +887,13 @@ class _DashboardScreenState extends State { child: InkWell( onTap: () => changeClinic(e.clinicID, context), - child: Text( + child: AppText( e.clinicName, - style: TextStyle( - fontSize: - SizeConfig.textMultiplier * - 1.9), + fontSize: + SizeConfig.textMultiplier * + 1.9, + + )), ), )) @@ -919,7 +982,7 @@ class DashboardItem extends StatelessWidget { borderRadius: BorderRadius.circular(6.0), border: hasBorder ? Border.all( width: 1.0, color: const Color(0xffcccccc)) : Border.all( - width: 0.0), + width: 0.0, color: Colors.transparent), image: imageName != null ? DecorationImage( image: AssetImage('assets/images/dashboard/${imageName}'), fit: BoxFit.cover,