dashboard changes

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

@ -236,276 +236,318 @@ class _DashboardScreenState extends State<DashboardScreen> {
top: MediaQuery.of(context).size.height * .1,
child: Container(
height: MediaQuery.of(context).size.height * 0.52,
child: Column(
children: [
RoundedContainer(
height:
MediaQuery.of(context).size.height * 0.24,
margin: 5,
child: Column(children: [
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets.all(5.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
rowCount(
model
.dashboardItemsList[
0]
.summaryoptions[0]
.kPIParameter,
model
.dashboardItemsList[
0]
.summaryoptions[0]
.value,
Colors.red),
rowCount(
model
.dashboardItemsList[
0]
.summaryoptions[1]
.kPIParameter,
model
.dashboardItemsList[
0]
.summaryoptions[1]
.value,
Colors.black),
rowCount(
model
.dashboardItemsList[
0]
.summaryoptions[2]
.kPIParameter,
model
.dashboardItemsList[
0]
.summaryoptions[2]
.value,
Colors.grey[800]),
],
))),
Expanded(
flex: 3,
child: Stack(children: [
Container(
child: GaugeChart(
_createInpatientData(
model))),
Positioned(
child: Column(
children: [
AppText(
TranslationBase.of(
context)
.inPatient,
fontSize: 11,
fontWeight:
FontWeight.bold,
),
AppText(
getPatientCount(model
.dashboardItemsList[0])
.toString(),
fontSize: 11,
fontWeight:
FontWeight.bold,
)
],
),
top: MediaQuery.of(context)
.size
.height *
0.08,
left: MediaQuery.of(context)
.size
.width *
0.10)
])),
],
)),
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
rowCount(
model
.dashboardItemsList[0]
.summaryoptions[3]
.kPIParameter,
model.dashboardItemsList[0]
.summaryoptions[3].value,
Colors.grey),
rowCount(
model
.dashboardItemsList[0]
.summaryoptions[4]
.kPIParameter,
model.dashboardItemsList[0]
.summaryoptions[4].value,
Colors.grey[300]),
],
)),
)
])),
RoundedContainer(
height:
MediaQuery.of(context).size.height * 0.24,
margin: 5,
child: Column(children: [
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets.all(5.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
rowCount(
model
.dashboardItemsList[
1]
.summaryoptions[0]
.kPIParameter,
model
.dashboardItemsList[
1]
.summaryoptions[0]
.value,
Colors.red),
rowCount(
model
.dashboardItemsList[
1]
.summaryoptions[1]
.kPIParameter,
model
.dashboardItemsList[
1]
.summaryoptions[1]
.value,
Colors.black),
rowCount(
model
.dashboardItemsList[
1]
.summaryoptions[2]
.kPIParameter,
model
.dashboardItemsList[
1]
.summaryoptions[2]
.value,
Colors.grey[800]),
],
))),
Expanded(
child: model.dashboardItemsList.length > 0
? Column(
children: [
RoundedContainer(
height:
MediaQuery.of(context).size.height *
0.24,
margin: 5,
child: Column(children: [
Expanded(
flex: 3,
child: Stack(children: [
Container(
child: GaugeChart(
_createOutPatientData(
model))),
Positioned(
child: Column(
children: [
AppText(
TranslationBase.of(
context)
.outPatient,
fontSize: 11,
fontWeight:
FontWeight.bold,
textOverflow:
TextOverflow
.ellipsis,
),
AppText(
getPatientCount(model
.dashboardItemsList[1])
.toString(),
fontSize: 11,
fontWeight:
FontWeight.bold,
)
],
),
top: MediaQuery.of(context)
.size
.height *
0.08,
left: MediaQuery.of(context)
.size
.width *
0.09)
]),
),
],
)),
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
rowCount(
model
.dashboardItemsList[1]
.summaryoptions[3]
.kPIParameter,
model.dashboardItemsList[1]
.summaryoptions[3].value,
Colors.grey),
rowCount(
model
.dashboardItemsList[1]
.summaryoptions[4]
.kPIParameter,
model.dashboardItemsList[1]
.summaryoptions[4].value,
Colors.grey[300]),
rowCount(
model
.dashboardItemsList[1]
.summaryoptions[5]
.kPIParameter,
model.dashboardItemsList[1]
.summaryoptions[5].value,
Colors.grey[200])
],
)),
)
]))
],
))
child: Row(
children: [
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets
.all(5.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
rowCount(
model
.dashboardItemsList[
0]
.summaryoptions[
0]
.kPIParameter,
model
.dashboardItemsList[
0]
.summaryoptions[
0]
.value,
Colors.red),
rowCount(
model
.dashboardItemsList[
0]
.summaryoptions[
1]
.kPIParameter,
model
.dashboardItemsList[
0]
.summaryoptions[
1]
.value,
Colors.black),
rowCount(
model
.dashboardItemsList[
0]
.summaryoptions[
2]
.kPIParameter,
model
.dashboardItemsList[
0]
.summaryoptions[
2]
.value,
Colors
.grey[800]),
],
))),
Expanded(
flex: 3,
child: Stack(children: [
Container(
child: GaugeChart(
_createInpatientData(
model))),
Positioned(
child: Column(
children: [
AppText(
TranslationBase.of(
context)
.inPatient,
fontSize: 11,
fontWeight:
FontWeight
.bold,
),
AppText(
getPatientCount(
model.dashboardItemsList[
0])
.toString(),
fontSize: 11,
fontWeight:
FontWeight
.bold,
)
],
),
top: MediaQuery.of(
context)
.size
.height *
0.08,
left: MediaQuery.of(
context)
.size
.width *
0.10)
])),
],
)),
Expanded(
flex: 1,
child: Padding(
padding:
const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
rowCount(
model
.dashboardItemsList[0]
.summaryoptions[3]
.kPIParameter,
model
.dashboardItemsList[0]
.summaryoptions[3]
.value,
Colors.grey),
rowCount(
model
.dashboardItemsList[0]
.summaryoptions[4]
.kPIParameter,
model
.dashboardItemsList[0]
.summaryoptions[4]
.value,
Colors.grey[300]),
],
)),
)
])),
RoundedContainer(
height:
MediaQuery.of(context).size.height *
0.24,
margin: 5,
child: Column(children: [
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets
.all(5.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
rowCount(
model
.dashboardItemsList[
1]
.summaryoptions[
0]
.kPIParameter,
model
.dashboardItemsList[
1]
.summaryoptions[
0]
.value,
Colors.red),
rowCount(
model
.dashboardItemsList[
1]
.summaryoptions[
1]
.kPIParameter,
model
.dashboardItemsList[
1]
.summaryoptions[
1]
.value,
Colors.black),
rowCount(
model
.dashboardItemsList[
1]
.summaryoptions[
2]
.kPIParameter,
model
.dashboardItemsList[
1]
.summaryoptions[
2]
.value,
Colors
.grey[800]),
],
))),
Expanded(
flex: 3,
child: Stack(children: [
Container(
child: GaugeChart(
_createOutPatientData(
model))),
Positioned(
child: Column(
children: [
AppText(
TranslationBase.of(
context)
.outPatient,
fontSize: 11,
fontWeight:
FontWeight
.bold,
textOverflow:
TextOverflow
.ellipsis,
),
AppText(
getPatientCount(
model.dashboardItemsList[
1])
.toString(),
fontSize: 11,
fontWeight:
FontWeight
.bold,
)
],
),
top: MediaQuery.of(
context)
.size
.height *
0.08,
left: MediaQuery.of(
context)
.size
.width *
0.09)
]),
),
],
)),
Expanded(
flex: 1,
child: Padding(
padding:
const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
rowCount(
model
.dashboardItemsList[1]
.summaryoptions[3]
.kPIParameter,
model
.dashboardItemsList[1]
.summaryoptions[3]
.value,
Colors.grey),
rowCount(
model
.dashboardItemsList[1]
.summaryoptions[4]
.kPIParameter,
model
.dashboardItemsList[1]
.summaryoptions[4]
.value,
Colors.grey[300]),
rowCount(
model
.dashboardItemsList[1]
.summaryoptions[5]
.kPIParameter,
model
.dashboardItemsList[1]
.summaryoptions[5]
.value,
Colors.grey[200])
],
)),
)
]))
],
)
: SizedBox())
//ExpandableCardContainer(
// expandedChild: Container(
// margin: EdgeInsets.only(left: 10, right: 10),

Loading…
Cancel
Save