add improvement dashboard screen design

merge-requests/157/head
Elham Rababah 6 years ago
parent e37a3e8ce1
commit dff6c25031

@ -222,8 +222,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Divider(),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.only(
top: 8.0, bottom: 8, right: 40, left: 8),
child: CircularPercentIndicator( child: CircularPercentIndicator(
radius: 100, radius: 100,
animation: true, animation: true,
@ -234,14 +236,17 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
AppText("38", AppText("38",
fontWeight: FontWeight.bold, fontSize:
fontSize: SizeConfig.textMultiplier * 4), SizeConfig.textMultiplier * 3.7,
color: Hexcolor('#5D4C35'),
fontWeight: FontWeight.bold,),
AppText(TranslationBase AppText(TranslationBase
.of(context) .of(context)
.outPatients, .outPatients,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
color: Colors.grey[800]), color: Hexcolor('#5D4C35'),
),
], ],
), ),
circularStrokeCap: CircularStrokeCap.butt, circularStrokeCap: CircularStrokeCap.butt,
@ -249,68 +254,121 @@ class _DashboardScreenState extends State<DashboardScreen> {
progressColor: Hexcolor('#B8382C'), progressColor: Hexcolor('#B8382C'),
), ),
), ),
Column( Container(
mainAxisAlignment: MainAxisAlignment.center, child: Table(
children: <Widget>[ defaultColumnWidth: FixedColumnWidth(
Padding( MediaQuery.of(context).size.width / 5),
padding: const EdgeInsets.all(12.0), // border: TableBorder.all(
child: Row( // color: Colors.black26,
children: <Widget>[ // width: 1,
Column( // style: BorderStyle.solid),
children: <Widget>[ border: TableBorder.symmetric(
Column( inside: BorderSide(
width: 0.5,
color: Hexcolor('#5D4C35'),
),
),
children: [
TableRow(
children: [
TableCell(
child: Center(
child: Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase AppText(
.of(context) TranslationBase.of(context).arrived,
.arrived), fontSize:
Text("23"), SizeConfig.textMultiplier * 1.5,
], color: Hexcolor('#5D4C35'),
),
AppText(
"23",
fontSize:
SizeConfig.textMultiplier * 2.7,
color: Hexcolor('#5D4C35'),
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 12, height: 6,
), ),
Column( ],
),
)),
TableCell(
child: Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase AppText(
.of(context) TranslationBase.of(context).er,
.notArrived), fontSize:
Text("23"), 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: <Widget>[
SizedBox( SizedBox(
width: 12, height: 6,
height: 33, ),
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,
), ),
Column(
children: <Widget>[
Column(
children: <Widget>[
Text(TranslationBase
.of(context)
.er),
Text("23"),
], ],
), ),
SizedBox(
height: 12,
), ),
Column( TableCell(
child: Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase SizedBox(
.of(context) height: 6,
.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,7 +854,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
CupertinoButton( CupertinoButton(
child: Text(TranslationBase.of(context).cancel child: AppText(TranslationBase
.of(context)
.cancel
// style: TextStyle(context) // style: TextStyle(context)
), ),
onPressed: () { onPressed: () {
@ -804,7 +864,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
}, },
), ),
CupertinoButton( CupertinoButton(
child: Text(TranslationBase.of(context).done child: AppText(TranslationBase
.of(context)
.done
// style: textStyle(context), // style: textStyle(context),
), ),
onPressed: () { onPressed: () {
@ -825,12 +887,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: InkWell( child: InkWell(
onTap: () => onTap: () =>
changeClinic(e.clinicID, context), changeClinic(e.clinicID, context),
child: Text( child: AppText(
e.clinicName, e.clinicName,
style: TextStyle(
fontSize: fontSize:
SizeConfig.textMultiplier * SizeConfig.textMultiplier *
1.9), 1.9,
)), )),
), ),
)) ))
@ -919,7 +982,7 @@ class DashboardItem extends StatelessWidget {
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder ? Border.all( border: hasBorder ? Border.all(
width: 1.0, color: const Color(0xffcccccc)) : 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: imageName != null ? DecorationImage(
image: AssetImage('assets/images/dashboard/${imageName}'), image: AssetImage('assets/images/dashboard/${imageName}'),
fit: BoxFit.cover, fit: BoxFit.cover,

Loading…
Cancel
Save