dashboard changes

merge-requests/315/head
Sultan Khan 5 years ago
parent 388c095d7f
commit 6bdd4e06a1

@ -236,11 +236,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
top: MediaQuery.of(context).size.height * .1, top: MediaQuery.of(context).size.height * .1,
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.52, height: MediaQuery.of(context).size.height * 0.52,
child: Column( child: model.dashboardItemsList.length > 0
? Column(
children: [ children: [
RoundedContainer( RoundedContainer(
height: height:
MediaQuery.of(context).size.height * 0.24, MediaQuery.of(context).size.height *
0.24,
margin: 5, margin: 5,
child: Column(children: [ child: Column(children: [
Expanded( Expanded(
@ -251,7 +253,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
flex: 5, flex: 5,
child: Padding( child: Padding(
padding: padding:
const EdgeInsets.all(5.0), const EdgeInsets
.all(5.0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
@ -264,38 +267,45 @@ class _DashboardScreenState extends State<DashboardScreen> {
model model
.dashboardItemsList[ .dashboardItemsList[
0] 0]
.summaryoptions[0] .summaryoptions[
0]
.kPIParameter, .kPIParameter,
model model
.dashboardItemsList[ .dashboardItemsList[
0] 0]
.summaryoptions[0] .summaryoptions[
0]
.value, .value,
Colors.red), Colors.red),
rowCount( rowCount(
model model
.dashboardItemsList[ .dashboardItemsList[
0] 0]
.summaryoptions[1] .summaryoptions[
1]
.kPIParameter, .kPIParameter,
model model
.dashboardItemsList[ .dashboardItemsList[
0] 0]
.summaryoptions[1] .summaryoptions[
1]
.value, .value,
Colors.black), Colors.black),
rowCount( rowCount(
model model
.dashboardItemsList[ .dashboardItemsList[
0] 0]
.summaryoptions[2] .summaryoptions[
2]
.kPIParameter, .kPIParameter,
model model
.dashboardItemsList[ .dashboardItemsList[
0] 0]
.summaryoptions[2] .summaryoptions[
2]
.value, .value,
Colors.grey[800]), Colors
.grey[800]),
], ],
))), ))),
Expanded( Expanded(
@ -314,23 +324,28 @@ class _DashboardScreenState extends State<DashboardScreen> {
.inPatient, .inPatient,
fontSize: 11, fontSize: 11,
fontWeight: fontWeight:
FontWeight.bold, FontWeight
.bold,
), ),
AppText( AppText(
getPatientCount(model getPatientCount(
.dashboardItemsList[0]) model.dashboardItemsList[
0])
.toString(), .toString(),
fontSize: 11, fontSize: 11,
fontWeight: fontWeight:
FontWeight.bold, FontWeight
.bold,
) )
], ],
), ),
top: MediaQuery.of(context) top: MediaQuery.of(
context)
.size .size
.height * .height *
0.08, 0.08,
left: MediaQuery.of(context) left: MediaQuery.of(
context)
.size .size
.width * .width *
0.10) 0.10)
@ -340,7 +355,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding:
const EdgeInsets.all(5.0),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.start, MainAxisAlignment.start,
@ -350,16 +366,20 @@ class _DashboardScreenState extends State<DashboardScreen> {
.dashboardItemsList[0] .dashboardItemsList[0]
.summaryoptions[3] .summaryoptions[3]
.kPIParameter, .kPIParameter,
model.dashboardItemsList[0] model
.summaryoptions[3].value, .dashboardItemsList[0]
.summaryoptions[3]
.value,
Colors.grey), Colors.grey),
rowCount( rowCount(
model model
.dashboardItemsList[0] .dashboardItemsList[0]
.summaryoptions[4] .summaryoptions[4]
.kPIParameter, .kPIParameter,
model.dashboardItemsList[0] model
.summaryoptions[4].value, .dashboardItemsList[0]
.summaryoptions[4]
.value,
Colors.grey[300]), Colors.grey[300]),
], ],
)), )),
@ -367,7 +387,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
])), ])),
RoundedContainer( RoundedContainer(
height: height:
MediaQuery.of(context).size.height * 0.24, MediaQuery.of(context).size.height *
0.24,
margin: 5, margin: 5,
child: Column(children: [ child: Column(children: [
Expanded( Expanded(
@ -378,7 +399,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
flex: 5, flex: 5,
child: Padding( child: Padding(
padding: padding:
const EdgeInsets.all(5.0), const EdgeInsets
.all(5.0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
@ -391,38 +413,45 @@ class _DashboardScreenState extends State<DashboardScreen> {
model model
.dashboardItemsList[ .dashboardItemsList[
1] 1]
.summaryoptions[0] .summaryoptions[
0]
.kPIParameter, .kPIParameter,
model model
.dashboardItemsList[ .dashboardItemsList[
1] 1]
.summaryoptions[0] .summaryoptions[
0]
.value, .value,
Colors.red), Colors.red),
rowCount( rowCount(
model model
.dashboardItemsList[ .dashboardItemsList[
1] 1]
.summaryoptions[1] .summaryoptions[
1]
.kPIParameter, .kPIParameter,
model model
.dashboardItemsList[ .dashboardItemsList[
1] 1]
.summaryoptions[1] .summaryoptions[
1]
.value, .value,
Colors.black), Colors.black),
rowCount( rowCount(
model model
.dashboardItemsList[ .dashboardItemsList[
1] 1]
.summaryoptions[2] .summaryoptions[
2]
.kPIParameter, .kPIParameter,
model model
.dashboardItemsList[ .dashboardItemsList[
1] 1]
.summaryoptions[2] .summaryoptions[
2]
.value, .value,
Colors.grey[800]), Colors
.grey[800]),
], ],
))), ))),
Expanded( Expanded(
@ -441,26 +470,31 @@ class _DashboardScreenState extends State<DashboardScreen> {
.outPatient, .outPatient,
fontSize: 11, fontSize: 11,
fontWeight: fontWeight:
FontWeight.bold, FontWeight
.bold,
textOverflow: textOverflow:
TextOverflow TextOverflow
.ellipsis, .ellipsis,
), ),
AppText( AppText(
getPatientCount(model getPatientCount(
.dashboardItemsList[1]) model.dashboardItemsList[
1])
.toString(), .toString(),
fontSize: 11, fontSize: 11,
fontWeight: fontWeight:
FontWeight.bold, FontWeight
.bold,
) )
], ],
), ),
top: MediaQuery.of(context) top: MediaQuery.of(
context)
.size .size
.height * .height *
0.08, 0.08,
left: MediaQuery.of(context) left: MediaQuery.of(
context)
.size .size
.width * .width *
0.09) 0.09)
@ -471,7 +505,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding:
const EdgeInsets.all(5.0),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.start, MainAxisAlignment.start,
@ -481,31 +516,38 @@ class _DashboardScreenState extends State<DashboardScreen> {
.dashboardItemsList[1] .dashboardItemsList[1]
.summaryoptions[3] .summaryoptions[3]
.kPIParameter, .kPIParameter,
model.dashboardItemsList[1] model
.summaryoptions[3].value, .dashboardItemsList[1]
.summaryoptions[3]
.value,
Colors.grey), Colors.grey),
rowCount( rowCount(
model model
.dashboardItemsList[1] .dashboardItemsList[1]
.summaryoptions[4] .summaryoptions[4]
.kPIParameter, .kPIParameter,
model.dashboardItemsList[1] model
.summaryoptions[4].value, .dashboardItemsList[1]
.summaryoptions[4]
.value,
Colors.grey[300]), Colors.grey[300]),
rowCount( rowCount(
model model
.dashboardItemsList[1] .dashboardItemsList[1]
.summaryoptions[5] .summaryoptions[5]
.kPIParameter, .kPIParameter,
model.dashboardItemsList[1] model
.summaryoptions[5].value, .dashboardItemsList[1]
.summaryoptions[5]
.value,
Colors.grey[200]) Colors.grey[200])
], ],
)), )),
) )
])) ]))
], ],
)) )
: SizedBox())
//ExpandableCardContainer( //ExpandableCardContainer(
// expandedChild: Container( // expandedChild: Container(
// margin: EdgeInsets.only(left: 10, right: 10), // margin: EdgeInsets.only(left: 10, right: 10),

Loading…
Cancel
Save