|
|
|
|
@ -19,7 +19,7 @@ import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:percent_indicator/circular_percent_indicator.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
|
|
|
|
import '../routes.dart';
|
|
|
|
|
import '../widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'doctor/doctor_reply_screen.dart';
|
|
|
|
|
@ -47,7 +47,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
ProjectProvider projectsProvider;
|
|
|
|
|
var _isInit = true;
|
|
|
|
|
DoctorProfileModel profile;
|
|
|
|
|
|
|
|
|
|
bool isExpanded = false;
|
|
|
|
|
String isInpatient = "";
|
|
|
|
|
void didChangeDependencies() async {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
if (_isInit) {
|
|
|
|
|
@ -77,7 +78,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
isLoading: isLoading,
|
|
|
|
|
body: ListView(children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
@ -211,182 +211,437 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: 90,
|
|
|
|
|
height: this.isExpanded ? 150 : 90,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 9.0,
|
|
|
|
|
left: 9,
|
|
|
|
|
bottom: 19,
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: HexColor("#DED8CF"),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
height: 140,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Divider(),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
top: 8.0, bottom: 8, right: 40, left: 8),
|
|
|
|
|
child: CircularPercentIndicator(
|
|
|
|
|
radius: 100,
|
|
|
|
|
animation: true,
|
|
|
|
|
animationDuration: 1200,
|
|
|
|
|
lineWidth: 7.0,
|
|
|
|
|
percent: .75,
|
|
|
|
|
center: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"38",
|
|
|
|
|
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: HexColor('#5D4C35'),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
right: 9.0,
|
|
|
|
|
left: 9,
|
|
|
|
|
bottom: 15,
|
|
|
|
|
child: ExpandableCardContainer(
|
|
|
|
|
expandedChild: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.22
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DashboardItem(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
this.isExpanded = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 24,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
: "",
|
|
|
|
|
//'My Admitted Patient',
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 28,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
: "",
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 28),
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
textAlign: TextAlign.center)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[3]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[3]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 28),
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[3]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[3]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
textAlign: TextAlign.center)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[
|
|
|
|
|
4]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[
|
|
|
|
|
4]
|
|
|
|
|
.value
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 28),
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList
|
|
|
|
|
.length >
|
|
|
|
|
0
|
|
|
|
|
? isInpatient == 'in'
|
|
|
|
|
? model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
0]
|
|
|
|
|
.summaryoptions[
|
|
|
|
|
4]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
.toString()
|
|
|
|
|
: model
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
1]
|
|
|
|
|
.summaryoptions[
|
|
|
|
|
4]
|
|
|
|
|
.kPIParameter
|
|
|
|
|
.toString()
|
|
|
|
|
: "",
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
textAlign: TextAlign.center)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
imageName: '5.png',
|
|
|
|
|
color: HexColor('#B8382C'),
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.9,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.22
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
),
|
|
|
|
|
circularStrokeCap: CircularStrokeCap.butt,
|
|
|
|
|
backgroundColor: Colors.blueGrey[100],
|
|
|
|
|
progressColor: HexColor('#B8382C'),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
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(
|
|
|
|
|
),
|
|
|
|
|
collapsedChild: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.15
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DashboardItem(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
this.isExpanded = true;
|
|
|
|
|
this.isInpatient = 'in';
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).arrived,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 1.5,
|
|
|
|
|
color: HexColor('#5D4C35'),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {},
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"23",
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
|
? getPatientCount(
|
|
|
|
|
model.dashboardItemsList[0])
|
|
|
|
|
: "",
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.7,
|
|
|
|
|
color: HexColor('#5D4C35'),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 6,
|
|
|
|
|
SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
Flexible(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).inPatient,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textOverflow: TextOverflow.ellipsis,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
TableCell(
|
|
|
|
|
child: Column(
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.in_patient_white,
|
|
|
|
|
size: 35,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageName: '4.png',
|
|
|
|
|
color: HexColor('#B8382C'),
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.15
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
),
|
|
|
|
|
DashboardItem(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isExpanded = true;
|
|
|
|
|
this.isInpatient = 'out';
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).er,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 1.5,
|
|
|
|
|
color: HexColor('#5D4C35'),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"03",
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
|
? getPatientCount(
|
|
|
|
|
model.dashboardItemsList[1])
|
|
|
|
|
: "",
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.7,
|
|
|
|
|
color: HexColor('#5D4C35'),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 6,
|
|
|
|
|
SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
Flexible(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.outPatients,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textOverflow: TextOverflow.ellipsis,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
//
|
|
|
|
|
),
|
|
|
|
|
TableRow(children: [
|
|
|
|
|
TableCell(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 6,
|
|
|
|
|
),
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
TableCell(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 6,
|
|
|
|
|
),
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.out_patient,
|
|
|
|
|
size: 35,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageName: '5.png',
|
|
|
|
|
color: HexColor('#B8382C'),
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.15
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
isExpanded: isExpanded,
|
|
|
|
|
))
|
|
|
|
|
]),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.90,
|
|
|
|
|
@ -412,16 +667,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
// margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"08",
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
|
? getPatientCount(
|
|
|
|
|
model.dashboardItemsList[7])
|
|
|
|
|
: "",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).labResult,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.targetPatient,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
@ -449,7 +709,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"10",
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
|
? getPatientCount(
|
|
|
|
|
model.dashboardItemsList[6])
|
|
|
|
|
: "",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
@ -482,7 +745,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"05",
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
|
? getPatientCount(
|
|
|
|
|
model.dashboardItemsList[2])
|
|
|
|
|
: "",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
@ -503,99 +769,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DashboardItem(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.in_patient_white,
|
|
|
|
|
size: 40,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"14",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).inPatient,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageName: '4.png',
|
|
|
|
|
color: HexColor('#B8382C'),
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.13
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
),
|
|
|
|
|
DashboardItem(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.operations,
|
|
|
|
|
size: 40,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"07",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 6,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).operations,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageName: '5.png',
|
|
|
|
|
color: HexColor('#B8382C'),
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.13
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
@ -909,8 +1082,17 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
this.isLoading = val;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getPatientCount(DashboardModel inPatientCount) {
|
|
|
|
|
int value = 0;
|
|
|
|
|
inPatientCount.summaryoptions.forEach((result) => {value += result.value});
|
|
|
|
|
|
|
|
|
|
return value.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getSummaryResult(item) {}
|
|
|
|
|
|
|
|
|
|
// TODO Move to it file
|
|
|
|
|
class DashboardItem extends StatelessWidget {
|
|
|
|
|
const DashboardItem(
|
|
|
|
|
@ -970,3 +1152,28 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ExpandableCardContainer extends StatefulWidget {
|
|
|
|
|
final bool isExpanded;
|
|
|
|
|
final Widget collapsedChild;
|
|
|
|
|
final Widget expandedChild;
|
|
|
|
|
|
|
|
|
|
const ExpandableCardContainer(
|
|
|
|
|
{Key key, this.isExpanded, this.collapsedChild, this.expandedChild})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_ExpandableCardContainerState createState() =>
|
|
|
|
|
_ExpandableCardContainerState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _ExpandableCardContainerState extends State<ExpandableCardContainer> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return new AnimatedContainer(
|
|
|
|
|
duration: new Duration(milliseconds: 1000),
|
|
|
|
|
curve: Curves.easeInOut,
|
|
|
|
|
child: widget.isExpanded ? widget.expandedChild : widget.collapsedChild,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|