|
|
|
|
@ -27,55 +27,59 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Swiper(
|
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
|
if (mounted) {
|
|
|
|
|
setState(() {
|
|
|
|
|
sliderActiveIndex = index;
|
|
|
|
|
widget.sliderChange(index);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return getSwipeWidget(widget.dashboardItemList, 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
|
|
|
|
|
? SwiperRoundedPagination(true)
|
|
|
|
|
: SwiperRoundedPagination(false),
|
|
|
|
|
config.activeIndex == 1
|
|
|
|
|
? SwiperRoundedPagination(true)
|
|
|
|
|
: SwiperRoundedPagination(false),
|
|
|
|
|
config.activeIndex == 2
|
|
|
|
|
? SwiperRoundedPagination(true)
|
|
|
|
|
: SwiperRoundedPagination(false),
|
|
|
|
|
],
|
|
|
|
|
return Container(
|
|
|
|
|
// height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
|
height: 230,
|
|
|
|
|
child: Swiper(
|
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
|
if (mounted) {
|
|
|
|
|
setState(() {
|
|
|
|
|
sliderActiveIndex = index;
|
|
|
|
|
widget.sliderChange(index);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return getSwipeWidget(widget.dashboardItemList, 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
|
|
|
|
|
? SwiperRoundedPagination(true)
|
|
|
|
|
: SwiperRoundedPagination(false),
|
|
|
|
|
config.activeIndex == 1
|
|
|
|
|
? SwiperRoundedPagination(true)
|
|
|
|
|
: SwiperRoundedPagination(false),
|
|
|
|
|
config.activeIndex == 2
|
|
|
|
|
? SwiperRoundedPagination(true)
|
|
|
|
|
: SwiperRoundedPagination(false),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
viewportFraction: 0.9,
|
|
|
|
|
// scale: 0.9,
|
|
|
|
|
// control: new SwiperControl(),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
viewportFraction: 0.9,
|
|
|
|
|
// scale: 0.9,
|
|
|
|
|
// control: new SwiperControl(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -83,21 +87,21 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
if (index == 1)
|
|
|
|
|
return RoundedContainer(
|
|
|
|
|
raduis: 16,
|
|
|
|
|
margin: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
|
child: GetOutPatientStack(dashboardItemList[1])));
|
|
|
|
|
if (index == 0)
|
|
|
|
|
return RoundedContainer(
|
|
|
|
|
raduis: 16,
|
|
|
|
|
margin: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
|
child: GetOutPatientStack(dashboardItemList[0])));
|
|
|
|
|
if (index == 2)
|
|
|
|
|
return RoundedContainer(
|
|
|
|
|
raduis: 16,
|
|
|
|
|
margin: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child:
|
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
@ -112,61 +116,65 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.patients,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referral,
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.patients,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referral,
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.black),
|
|
|
|
|
RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.grey),
|
|
|
|
|
RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.red),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.black),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.grey),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.red),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
@ -187,7 +195,7 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
widget.model
|
|
|
|
|
.getPatientCount(dashboardItemList[2])
|
|
|
|
|
.toString(),
|
|
|
|
|
fontSize: 30,
|
|
|
|
|
fontSize: 28,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
|