|
|
|
@ -132,89 +132,103 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
body: ListView(children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(height: 20),
|
|
|
|
|
Stack(children: [
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: Image.asset('assets/images/menu.png'),
|
|
|
|
|
iconSize: 15,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ProfileWelcomeWidget(
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
margin: EdgeInsets.all(4),
|
|
|
|
|
decoration: new BoxDecoration(
|
|
|
|
|
color: Colors.red[800],
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
|
minWidth: 20,
|
|
|
|
|
minHeight: 20,
|
|
|
|
|
),
|
|
|
|
|
child: new Text(
|
|
|
|
|
projectsProvider.doctorClinicsList.length
|
|
|
|
|
.toString(),
|
|
|
|
|
style: new TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: projectsProvider.isArabic ? 10 : 11,
|
|
|
|
|
),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * .6,
|
|
|
|
|
// // height: 100,
|
|
|
|
|
child: projectsProvider.doctorClinicsList.length > 0
|
|
|
|
|
? Stack(
|
|
|
|
|
children: [
|
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
dropdownColor: Colors.white,
|
|
|
|
|
iconEnabledColor: Colors.black,
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: clinicId == null
|
|
|
|
|
? projectsProvider
|
|
|
|
|
.doctorClinicsList[0].clinicID
|
|
|
|
|
: clinicId,
|
|
|
|
|
iconSize: 25,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return projectsProvider
|
|
|
|
|
children: [
|
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
dropdownColor: Colors.white,
|
|
|
|
|
iconEnabledColor: Colors.black,
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: clinicId == null
|
|
|
|
|
? projectsProvider
|
|
|
|
|
.doctorClinicsList[0].clinicID
|
|
|
|
|
: clinicId,
|
|
|
|
|
iconSize: 25,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return projectsProvider
|
|
|
|
|
.doctorClinicsList
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(2),
|
|
|
|
|
margin: EdgeInsets.all(2),
|
|
|
|
|
decoration: new BoxDecoration(
|
|
|
|
|
color: Colors.red[800],
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
20),
|
|
|
|
|
),
|
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
|
minWidth: 20,
|
|
|
|
|
minHeight: 20,
|
|
|
|
|
),
|
|
|
|
|
child: new Text(
|
|
|
|
|
projectsProvider
|
|
|
|
|
.doctorClinicsList
|
|
|
|
|
.length
|
|
|
|
|
.toString(),
|
|
|
|
|
style: new TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? 10
|
|
|
|
|
: 11,
|
|
|
|
|
),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(item.clinicName,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.end),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) {
|
|
|
|
|
clinicId = newValue;
|
|
|
|
|
changeClinic(
|
|
|
|
|
newValue, context, model);
|
|
|
|
|
},
|
|
|
|
|
items: projectsProvider
|
|
|
|
|
.doctorClinicsList
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(item.clinicName,
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
1.6,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center),
|
|
|
|
|
],
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
child: AppText(
|
|
|
|
|
item.clinicName,
|
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
|
),
|
|
|
|
|
value: item.clinicID,
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) {
|
|
|
|
|
clinicId = newValue;
|
|
|
|
|
changeClinic(
|
|
|
|
|
newValue, context, model);
|
|
|
|
|
},
|
|
|
|
|
items: projectsProvider
|
|
|
|
|
.doctorClinicsList
|
|
|
|
|
.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
child: Text(
|
|
|
|
|
item.clinicName,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
value: item.clinicID,
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
}).toList(),
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: AppText(TranslationBase.of(context).noClinic),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -222,226 +236,208 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
isClilic: true,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.20,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.24,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 9.0,
|
|
|
|
|
left: 9,
|
|
|
|
|
top: MediaQuery.of(context).size.height * .05,
|
|
|
|
|
top: MediaQuery.of(context).size.height * .08,
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
|
child: model.dashboardItemsList.length > 0
|
|
|
|
|
? new Swiper(
|
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
|
if (mounted) {
|
|
|
|
|
setState(() {
|
|
|
|
|
sliderActiveIndex = index;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return getSwipeWidget(model)[index];
|
|
|
|
|
},
|
|
|
|
|
itemCount: 3,
|
|
|
|
|
|
|
|
|
|
pagination: new SwiperCustomPagination(builder:
|
|
|
|
|
(BuildContext context,
|
|
|
|
|
SwiperPluginConfig config) {
|
|
|
|
|
return new Stack(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
children: [
|
|
|
|
|
Positioned(
|
|
|
|
|
bottom: -5,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {},
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 10,
|
|
|
|
|
width: 50,
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(2),
|
|
|
|
|
color:
|
|
|
|
|
config.activeIndex ==
|
|
|
|
|
0
|
|
|
|
|
? Colors.black
|
|
|
|
|
: Colors
|
|
|
|
|
.grey),
|
|
|
|
|
Container(
|
|
|
|
|
height: 10,
|
|
|
|
|
width: 50,
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(2),
|
|
|
|
|
color:
|
|
|
|
|
config.activeIndex ==
|
|
|
|
|
1
|
|
|
|
|
? Colors.black
|
|
|
|
|
: Colors
|
|
|
|
|
.grey),
|
|
|
|
|
Container(
|
|
|
|
|
height: 10,
|
|
|
|
|
width: 50,
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(2),
|
|
|
|
|
color:
|
|
|
|
|
config.activeIndex ==
|
|
|
|
|
2
|
|
|
|
|
? Colors.black
|
|
|
|
|
: Colors
|
|
|
|
|
.grey),
|
|
|
|
|
],
|
|
|
|
|
)))))
|
|
|
|
|
]);
|
|
|
|
|
}),
|
|
|
|
|
viewportFraction: 0.9,
|
|
|
|
|
// scale: 0.9,
|
|
|
|
|
// control: new SwiperControl(),
|
|
|
|
|
)
|
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
|
if (mounted) {
|
|
|
|
|
setState(() {
|
|
|
|
|
sliderActiveIndex = index;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return getSwipeWidget(model)[index];
|
|
|
|
|
},
|
|
|
|
|
itemCount: 3,
|
|
|
|
|
itemHeight: 300,
|
|
|
|
|
pagination: new SwiperCustomPagination(builder:
|
|
|
|
|
(BuildContext context,
|
|
|
|
|
SwiperPluginConfig config) {
|
|
|
|
|
return new Stack(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
children: [
|
|
|
|
|
Positioned(
|
|
|
|
|
bottom: 0,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {},
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
config.activeIndex == 0
|
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
|
true)
|
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
|
false),
|
|
|
|
|
config.activeIndex == 1
|
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
|
true)
|
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
|
false),
|
|
|
|
|
config.activeIndex == 2
|
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
|
true)
|
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
|
false),
|
|
|
|
|
],
|
|
|
|
|
)))))
|
|
|
|
|
]);
|
|
|
|
|
}),
|
|
|
|
|
viewportFraction: 0.9,
|
|
|
|
|
// scale: 0.9,
|
|
|
|
|
// control: new SwiperControl(),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox()),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
model.dashboardItemsList.length > 0
|
|
|
|
|
? FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.90,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
widthFactor: 0.90,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
sliderActiveIndex == 1
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList[3].kPIName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.15
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.20,
|
|
|
|
|
child: new ListView(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
children: new List.generate(
|
|
|
|
|
model
|
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
|
.summaryoptions
|
|
|
|
|
.length, (int index) {
|
|
|
|
|
return getActivityButton(model
|
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
|
.summaryoptions[index]);
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList[3].kPIName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.2,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.15
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.20,
|
|
|
|
|
child: new ListView(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
children: new List.generate(
|
|
|
|
|
model
|
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
|
.summaryoptions
|
|
|
|
|
.length, (int index) {
|
|
|
|
|
return getActivityButton(model
|
|
|
|
|
.dashboardItemsList[3]
|
|
|
|
|
.summaryoptions[index]);
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: sliderActiveIndex == 0
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList[6]
|
|
|
|
|
.kPIName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.2,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.15
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.20,
|
|
|
|
|
child: new ListView(
|
|
|
|
|
scrollDirection:
|
|
|
|
|
Axis.horizontal,
|
|
|
|
|
children: new List.generate(
|
|
|
|
|
model
|
|
|
|
|
.dashboardItemsList[6]
|
|
|
|
|
.summaryoptions
|
|
|
|
|
.length, (int index) {
|
|
|
|
|
return getActivityButton(model
|
|
|
|
|
.dashboardItemsList[6]
|
|
|
|
|
.summaryoptions[index]);
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList[4]
|
|
|
|
|
.kPIName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.2,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.15
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.20,
|
|
|
|
|
child: new ListView(
|
|
|
|
|
scrollDirection:
|
|
|
|
|
Axis.horizontal,
|
|
|
|
|
children: new List.generate(
|
|
|
|
|
model
|
|
|
|
|
.dashboardItemsList[4]
|
|
|
|
|
.summaryoptions
|
|
|
|
|
.length, (int index) {
|
|
|
|
|
return getActivityButton(model
|
|
|
|
|
.dashboardItemsList[4]
|
|
|
|
|
.summaryoptions[index]);
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList[6]
|
|
|
|
|
.kPIName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.2,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.15
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.20,
|
|
|
|
|
child: new ListView(
|
|
|
|
|
scrollDirection:
|
|
|
|
|
Axis.horizontal,
|
|
|
|
|
children: new List.generate(
|
|
|
|
|
model
|
|
|
|
|
.dashboardItemsList[6]
|
|
|
|
|
.summaryoptions
|
|
|
|
|
.length, (int index) {
|
|
|
|
|
return getActivityButton(model
|
|
|
|
|
.dashboardItemsList[6]
|
|
|
|
|
.summaryoptions[index]);
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
model.dashboardItemsList[4]
|
|
|
|
|
.kPIName,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.2,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
new Container(
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.15
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.20,
|
|
|
|
|
child: new ListView(
|
|
|
|
|
scrollDirection:
|
|
|
|
|
Axis.horizontal,
|
|
|
|
|
children: new List.generate(
|
|
|
|
|
model
|
|
|
|
|
.dashboardItemsList[4]
|
|
|
|
|
.summaryoptions
|
|
|
|
|
.length, (int index) {
|
|
|
|
|
return getActivityButton(model
|
|
|
|
|
.dashboardItemsList[4]
|
|
|
|
|
.summaryoptions[index]);
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
])))
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
@ -452,31 +448,37 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topRight: Radius.circular(50),
|
|
|
|
|
)),
|
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
|
padding: EdgeInsets.only(left: 20, top: 10, right: 20),
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
width: 150,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).patient,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).patients,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
height: .5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).services,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
)
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
@ -509,6 +511,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
.patientsreferral,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -544,6 +547,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
.arrivalpatient,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -578,7 +582,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
.searchmedicinepatient,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -766,7 +770,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
|
|
|
|
|
var list = new List<Widget>();
|
|
|
|
|
value.summaryoptions.forEach((result) =>
|
|
|
|
|
{list.add(getStack(result, value.summaryoptions.first.value))});
|
|
|
|
|
{list.add(getStack(result, value.summaryoptions.first.value))});
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
@ -810,11 +814,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Align(
|
|
|
|
|
child: AppText(
|
|
|
|
|
value.kPIParameter + ' (' + value.value.toString() + ') ',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
)),
|
|
|
|
|
value.kPIParameter + ' (' + value.value.toString() + ') ',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
]);
|
|
|
|
@ -823,22 +827,22 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
List<Widget> getSwipeWidget(model) {
|
|
|
|
|
return [
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.32,
|
|
|
|
|
margin: 5,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
|
child: getOutPatientStack(model.dashboardItemsList[1]))),
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.32,
|
|
|
|
|
margin: 5,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
|
child: getOutPatientStack(model.dashboardItemsList[0]))),
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.24,
|
|
|
|
|
margin: 5,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child:
|
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Row(
|
|
|
|
@ -854,18 +858,38 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Padding(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).referral,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(10))),
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.patients,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
height: .5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referral,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
rowCount(
|
|
|
|
|
model.dashboardItemsList[2]
|
|
|
|
@ -917,4 +941,21 @@ 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));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|