|
|
|
@ -18,7 +18,11 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/dashboard/activity_button.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/dashboard/out_patient_stack.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/dashboard/swiper_rounded_pagination.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
@ -28,6 +32,7 @@ import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
|
|
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import 'package:sticky_headers/sticky_headers/widget.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../routes.dart';
|
|
|
|
import '../../routes.dart';
|
|
|
|
import '../../widgets/shared/app_texts_widget.dart';
|
|
|
|
import '../../widgets/shared/app_texts_widget.dart';
|
|
|
|
@ -130,10 +135,12 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
baseViewModel: model,
|
|
|
|
baseViewModel: model,
|
|
|
|
isShowAppBar: false,
|
|
|
|
isShowAppBar: false,
|
|
|
|
body: ListView(children: [
|
|
|
|
body: ListView(children: [
|
|
|
|
Column(
|
|
|
|
Column(children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
StickyHeader(
|
|
|
|
SizedBox(height: 20),
|
|
|
|
header: Container(
|
|
|
|
Stack(children: [
|
|
|
|
color: Colors.grey[100],
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: 10),
|
|
|
|
|
|
|
|
child: Stack(children: [
|
|
|
|
IconButton(
|
|
|
|
IconButton(
|
|
|
|
icon: Image.asset('assets/images/menu.png',
|
|
|
|
icon: Image.asset('assets/images/menu.png',
|
|
|
|
height: 50, width: 50),
|
|
|
|
height: 50, width: 50),
|
|
|
|
@ -141,8 +148,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
color: Colors.black,
|
|
|
|
color: Colors.black,
|
|
|
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
|
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
ProfileWelcomeWidget(
|
|
|
|
ProfileWelcomeWidget(
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
@ -150,7 +156,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * .6,
|
|
|
|
width: MediaQuery.of(context).size.width * .6,
|
|
|
|
// // height: 100,
|
|
|
|
// // height: 100,
|
|
|
|
child: projectsProvider.doctorClinicsList.length > 0
|
|
|
|
child: projectsProvider.doctorClinicsList.length >
|
|
|
|
|
|
|
|
0
|
|
|
|
? Stack(
|
|
|
|
? Stack(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
@ -177,7 +184,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.all(2),
|
|
|
|
padding: EdgeInsets.all(2),
|
|
|
|
margin: EdgeInsets.all(2),
|
|
|
|
margin: EdgeInsets.all(2),
|
|
|
|
decoration: new BoxDecoration(
|
|
|
|
decoration:
|
|
|
|
|
|
|
|
new BoxDecoration(
|
|
|
|
color: Colors.red[800],
|
|
|
|
color: Colors.red[800],
|
|
|
|
borderRadius:
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
BorderRadius.circular(
|
|
|
|
@ -194,18 +202,21 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.toString(),
|
|
|
|
.toString(),
|
|
|
|
style: new TextStyle(
|
|
|
|
style: new TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: projectsProvider
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
projectsProvider
|
|
|
|
.isArabic
|
|
|
|
.isArabic
|
|
|
|
? 10
|
|
|
|
? 10
|
|
|
|
: 11,
|
|
|
|
: 11,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign:
|
|
|
|
|
|
|
|
TextAlign.center,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(item.clinicName,
|
|
|
|
AppText(item.clinicName,
|
|
|
|
fontSize: 12,
|
|
|
|
fontSize: 12,
|
|
|
|
color: Colors.black,
|
|
|
|
color: Colors.black,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.bold,
|
|
|
|
textAlign: TextAlign.end),
|
|
|
|
textAlign: TextAlign.end),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -230,22 +241,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: AppText(TranslationBase.of(context).noClinic),
|
|
|
|
: AppText(
|
|
|
|
|
|
|
|
TranslationBase.of(context).noClinic),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
isClilic: true,
|
|
|
|
isClilic: true,
|
|
|
|
|
|
|
|
height: 50,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
])),
|
|
|
|
|
|
|
|
content: Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.24,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
right: 9.0,
|
|
|
|
|
|
|
|
left: 9,
|
|
|
|
|
|
|
|
top: MediaQuery.of(context).size.height * .08,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
child: model.dashboardItemsList.length > 0
|
|
|
|
child: model.dashboardItemsList.length > 0
|
|
|
|
? new Swiper(
|
|
|
|
? new Swiper(
|
|
|
|
@ -279,19 +287,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.spaceBetween,
|
|
|
|
.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
config.activeIndex == 0
|
|
|
|
config.activeIndex == 0
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
? SwiperRoundedPagination(
|
|
|
|
true)
|
|
|
|
true)
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
: SwiperRoundedPagination(
|
|
|
|
false),
|
|
|
|
false),
|
|
|
|
config.activeIndex == 1
|
|
|
|
config.activeIndex == 1
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
? SwiperRoundedPagination(
|
|
|
|
true)
|
|
|
|
true)
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
: SwiperRoundedPagination(
|
|
|
|
false),
|
|
|
|
false),
|
|
|
|
config.activeIndex == 2
|
|
|
|
config.activeIndex == 2
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
? SwiperRoundedPagination(
|
|
|
|
true)
|
|
|
|
true)
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
: SwiperRoundedPagination(
|
|
|
|
false),
|
|
|
|
false),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)))))
|
|
|
|
)))))
|
|
|
|
@ -302,8 +310,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
// control: new SwiperControl(),
|
|
|
|
// control: new SwiperControl(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: SizedBox()),
|
|
|
|
: SizedBox()),
|
|
|
|
)
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
? FractionallySizedBox(
|
|
|
|
? FractionallySizedBox(
|
|
|
|
widthFactor: 0.90,
|
|
|
|
widthFactor: 0.90,
|
|
|
|
@ -322,9 +328,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
model.dashboardItemsList[3].kPIName,
|
|
|
|
model.dashboardItemsList[3]
|
|
|
|
|
|
|
|
.kPIName,
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
SizeConfig.textMultiplier * 2.2,
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
|
|
|
2.2,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -342,13 +350,14 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
child: new ListView(
|
|
|
|
child: new ListView(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
scrollDirection:
|
|
|
|
|
|
|
|
Axis.horizontal,
|
|
|
|
children: new List.generate(
|
|
|
|
children: new List.generate(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
.summaryoptions
|
|
|
|
.summaryoptions
|
|
|
|
.length, (int index) {
|
|
|
|
.length, (int index) {
|
|
|
|
return getActivityButton(model
|
|
|
|
return GetActivityButton(model
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
.summaryoptions[index]);
|
|
|
|
.summaryoptions[index]);
|
|
|
|
})))
|
|
|
|
})))
|
|
|
|
@ -364,8 +373,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
model.dashboardItemsList[6]
|
|
|
|
model.dashboardItemsList[6]
|
|
|
|
.kPIName,
|
|
|
|
.kPIName,
|
|
|
|
fontSize:
|
|
|
|
fontSize: SizeConfig
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
.textMultiplier *
|
|
|
|
2.2,
|
|
|
|
2.2,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -384,15 +393,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
child: new ListView(
|
|
|
|
child: new ListView(
|
|
|
|
scrollDirection:
|
|
|
|
scrollDirection: Axis
|
|
|
|
Axis.horizontal,
|
|
|
|
.horizontal,
|
|
|
|
children: new List.generate(
|
|
|
|
children: new List
|
|
|
|
|
|
|
|
.generate(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
.dashboardItemsList[6]
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
|
|
|
6]
|
|
|
|
.summaryoptions
|
|
|
|
.summaryoptions
|
|
|
|
.length, (int index) {
|
|
|
|
.length,
|
|
|
|
return getActivityButton(model
|
|
|
|
(int index) {
|
|
|
|
.dashboardItemsList[6]
|
|
|
|
return GetActivityButton(model
|
|
|
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
|
|
|
6]
|
|
|
|
.summaryoptions[index]);
|
|
|
|
.summaryoptions[index]);
|
|
|
|
})))
|
|
|
|
})))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -406,8 +419,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
model.dashboardItemsList[4]
|
|
|
|
model.dashboardItemsList[4]
|
|
|
|
.kPIName,
|
|
|
|
.kPIName,
|
|
|
|
fontSize:
|
|
|
|
fontSize: SizeConfig
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
.textMultiplier *
|
|
|
|
2.2,
|
|
|
|
2.2,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -426,15 +439,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
child: new ListView(
|
|
|
|
child: new ListView(
|
|
|
|
scrollDirection:
|
|
|
|
scrollDirection: Axis
|
|
|
|
Axis.horizontal,
|
|
|
|
.horizontal,
|
|
|
|
children: new List.generate(
|
|
|
|
children: new List
|
|
|
|
|
|
|
|
.generate(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
.dashboardItemsList[4]
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
|
|
|
4]
|
|
|
|
.summaryoptions
|
|
|
|
.summaryoptions
|
|
|
|
.length, (int index) {
|
|
|
|
.length,
|
|
|
|
return getActivityButton(model
|
|
|
|
(int index) {
|
|
|
|
.dashboardItemsList[4]
|
|
|
|
return GetActivityButton(model
|
|
|
|
|
|
|
|
.dashboardItemsList[
|
|
|
|
|
|
|
|
4]
|
|
|
|
.summaryoptions[index]);
|
|
|
|
.summaryoptions[index]);
|
|
|
|
})))
|
|
|
|
})))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -463,7 +480,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
width: 150,
|
|
|
|
width: 150,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).patients,
|
|
|
|
TranslationBase.of(context).patients,
|
|
|
|
@ -521,7 +539,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) => PatientReferralScreen(),
|
|
|
|
builder: (context) =>
|
|
|
|
|
|
|
|
PatientReferralScreen(),
|
|
|
|
// MyReferredPatient(),
|
|
|
|
// MyReferredPatient(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -556,7 +575,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
Navigator.of(context)
|
|
|
|
Navigator.of(context)
|
|
|
|
.pushNamed(PATIENTS, arguments: {
|
|
|
|
.pushNamed(PATIENTS, arguments: {
|
|
|
|
"patientSearchForm": _patientSearchFormValues,
|
|
|
|
"patientSearchForm":
|
|
|
|
|
|
|
|
_patientSearchFormValues,
|
|
|
|
"selectedType": "7",
|
|
|
|
"selectedType": "7",
|
|
|
|
"arrivalType": "1"
|
|
|
|
"arrivalType": "1"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -623,6 +643,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -671,12 +693,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
projectID: doctorProfile.projectID,
|
|
|
|
projectID: doctorProfile.projectID,
|
|
|
|
tokenID: '',
|
|
|
|
tokenID: '',
|
|
|
|
languageID: 2);
|
|
|
|
languageID: 2);
|
|
|
|
|
|
|
|
|
|
|
|
// authProvider.getDocProfiles(docInfo)
|
|
|
|
|
|
|
|
authProvider.getDocProfiles(docInfo.toJson()).then((res) async {
|
|
|
|
authProvider.getDocProfiles(docInfo.toJson()).then((res) async {
|
|
|
|
changeIsLoading(false);
|
|
|
|
changeIsLoading(false);
|
|
|
|
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
|
|
|
|
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
|
|
|
|
// model.getDashboard();
|
|
|
|
|
|
|
|
}).catchError((err) {
|
|
|
|
}).catchError((err) {
|
|
|
|
changeIsLoading(false);
|
|
|
|
changeIsLoading(false);
|
|
|
|
Helpers.showErrorToast(err);
|
|
|
|
Helpers.showErrorToast(err);
|
|
|
|
@ -696,135 +715,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
return value.toString();
|
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget getActivityButton(value) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.24,
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).orientation == Orientation.portrait
|
|
|
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.15
|
|
|
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.20,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
child: AppText(value.value.toString(),
|
|
|
|
|
|
|
|
fontSize: 28, fontWeight: FontWeight.bold)),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: AppText(
|
|
|
|
|
|
|
|
value.kPIParameter,
|
|
|
|
|
|
|
|
textOverflow: TextOverflow.clip,
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget dot(Color c) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(5.0),
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5.0),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(color: c, shape: BoxShape.circle));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget rowCount(name, int count, Color c) {
|
|
|
|
|
|
|
|
return Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
dot(c),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: 5, bottom: 5),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
name,
|
|
|
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
textOverflow: TextOverflow.ellipsis,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
' (' + count.toString() + ')',
|
|
|
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget getOutPatientStack(value) {
|
|
|
|
|
|
|
|
value.summaryoptions
|
|
|
|
|
|
|
|
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var list = new List<Widget>();
|
|
|
|
|
|
|
|
value.summaryoptions.forEach((result) =>
|
|
|
|
|
|
|
|
{list.add(getStack(result, value.summaryoptions.first.value))});
|
|
|
|
|
|
|
|
return Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
value.kPIName,
|
|
|
|
|
|
|
|
medium: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getStack(Summaryoptions value, max) {
|
|
|
|
|
|
|
|
return Stack(children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
height: 150,
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
width: 40,
|
|
|
|
|
|
|
|
child: SizedBox(),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
bottom: 0,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
child: SizedBox(),
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
height: max != 0 ? (150 * value.value) / max : 0,
|
|
|
|
|
|
|
|
width: 40,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
|
|
|
color: Colors.red[300]))),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
height: 150,
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 5, top: 5),
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
child: RotatedBox(
|
|
|
|
|
|
|
|
quarterTurns: 1,
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: Align(
|
|
|
|
|
|
|
|
child: AppText(
|
|
|
|
|
|
|
|
value.kPIParameter + ' (' + value.value.toString() + ') ',
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Widget> getSwipeWidget(model) {
|
|
|
|
List<Widget> getSwipeWidget(model) {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
RoundedContainer(
|
|
|
|
RoundedContainer(
|
|
|
|
@ -832,13 +722,13 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
child: getOutPatientStack(model.dashboardItemsList[1]))),
|
|
|
|
child: GetOutPatientStack(model.dashboardItemsList[1]))),
|
|
|
|
RoundedContainer(
|
|
|
|
RoundedContainer(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
child: getOutPatientStack(model.dashboardItemsList[0]))),
|
|
|
|
child: GetOutPatientStack(model.dashboardItemsList[0]))),
|
|
|
|
RoundedContainer(
|
|
|
|
RoundedContainer(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
@ -892,19 +782,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
rowCount(
|
|
|
|
RowCounts(
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
.summaryoptions[0].kPIParameter,
|
|
|
|
.summaryoptions[0].kPIParameter,
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
.summaryoptions[0].value,
|
|
|
|
.summaryoptions[0].value,
|
|
|
|
Colors.black),
|
|
|
|
Colors.black),
|
|
|
|
rowCount(
|
|
|
|
RowCounts(
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
.summaryoptions[1].kPIParameter,
|
|
|
|
.summaryoptions[1].kPIParameter,
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
.summaryoptions[1].value,
|
|
|
|
.summaryoptions[1].value,
|
|
|
|
Colors.grey),
|
|
|
|
Colors.grey),
|
|
|
|
rowCount(
|
|
|
|
RowCounts(
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
.summaryoptions[2].kPIParameter,
|
|
|
|
.summaryoptions[2].kPIParameter,
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
@ -942,21 +832,4 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
])),
|
|
|
|
])),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getSwiperPagiantion(active) {
|
|
|
|
|
|
|
|
return active == true
|
|
|
|
|
|
|
|
? Container(
|
|
|
|
|
|
|
|
height: 5,
|
|
|
|
|
|
|
|
width: 30,
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(10),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(5), color: Colors.black),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
height: 5,
|
|
|
|
|
|
|
|
width: 8,
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(2),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(10), color: Colors.grey));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|