|
|
|
@ -132,33 +132,21 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
body: ListView(children: [
|
|
|
|
body: ListView(children: [
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
SizedBox(height: 20),
|
|
|
|
Stack(children: [
|
|
|
|
Stack(children: [
|
|
|
|
|
|
|
|
IconButton(
|
|
|
|
|
|
|
|
icon: Image.asset('assets/images/menu.png',
|
|
|
|
|
|
|
|
height: 50, width: 50),
|
|
|
|
|
|
|
|
iconSize: 18,
|
|
|
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
|
|
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
|
|
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
ProfileWelcomeWidget(
|
|
|
|
ProfileWelcomeWidget(
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
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(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * .6,
|
|
|
|
width: MediaQuery.of(context).size.width * .6,
|
|
|
|
// // height: 100,
|
|
|
|
// // height: 100,
|
|
|
|
@ -183,15 +171,42 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.map((item) {
|
|
|
|
.map((item) {
|
|
|
|
return Row(
|
|
|
|
return Row(
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
children: <Widget>[
|
|
|
|
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,
|
|
|
|
AppText(item.clinicName,
|
|
|
|
fontSize: SizeConfig
|
|
|
|
fontSize: 12,
|
|
|
|
.textMultiplier *
|
|
|
|
|
|
|
|
1.6,
|
|
|
|
|
|
|
|
color: Colors.black,
|
|
|
|
color: Colors.black,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
textAlign:
|
|
|
|
textAlign: TextAlign.end),
|
|
|
|
TextAlign.center),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}).toList();
|
|
|
|
}).toList();
|
|
|
|
@ -205,9 +220,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.doctorClinicsList
|
|
|
|
.doctorClinicsList
|
|
|
|
.map((item) {
|
|
|
|
.map((item) {
|
|
|
|
return DropdownMenuItem(
|
|
|
|
return DropdownMenuItem(
|
|
|
|
child: Text(
|
|
|
|
child: AppText(
|
|
|
|
item.clinicName,
|
|
|
|
item.clinicName,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
value: item.clinicID,
|
|
|
|
value: item.clinicID,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -222,16 +237,16 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
isClilic: true,
|
|
|
|
isClilic: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.20,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.24,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
Positioned(
|
|
|
|
right: 9.0,
|
|
|
|
right: 9.0,
|
|
|
|
left: 9,
|
|
|
|
left: 9,
|
|
|
|
top: MediaQuery.of(context).size.height * .05,
|
|
|
|
top: MediaQuery.of(context).size.height * .08,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
child: model.dashboardItemsList.length > 0
|
|
|
|
child: model.dashboardItemsList.length > 0
|
|
|
|
? new Swiper(
|
|
|
|
? new Swiper(
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
@ -245,7 +260,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
return getSwipeWidget(model)[index];
|
|
|
|
return getSwipeWidget(model)[index];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemCount: 3,
|
|
|
|
itemCount: 3,
|
|
|
|
|
|
|
|
itemHeight: 300,
|
|
|
|
pagination: new SwiperCustomPagination(builder:
|
|
|
|
pagination: new SwiperCustomPagination(builder:
|
|
|
|
(BuildContext context,
|
|
|
|
(BuildContext context,
|
|
|
|
SwiperPluginConfig config) {
|
|
|
|
SwiperPluginConfig config) {
|
|
|
|
@ -253,7 +268,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Positioned(
|
|
|
|
Positioned(
|
|
|
|
bottom: -5,
|
|
|
|
bottom: 0,
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
onTap: () {},
|
|
|
|
@ -263,39 +278,21 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
MainAxisAlignment
|
|
|
|
MainAxisAlignment
|
|
|
|
.spaceBetween,
|
|
|
|
.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
config.activeIndex == 0
|
|
|
|
height: 10,
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
width: 50,
|
|
|
|
true)
|
|
|
|
margin:
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
EdgeInsets.all(2),
|
|
|
|
false),
|
|
|
|
color:
|
|
|
|
config.activeIndex == 1
|
|
|
|
config.activeIndex ==
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
0
|
|
|
|
true)
|
|
|
|
? Colors.black
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
: Colors
|
|
|
|
false),
|
|
|
|
.grey),
|
|
|
|
config.activeIndex == 2
|
|
|
|
Container(
|
|
|
|
? getSwiperPagiantion(
|
|
|
|
height: 10,
|
|
|
|
true)
|
|
|
|
width: 50,
|
|
|
|
: getSwiperPagiantion(
|
|
|
|
margin:
|
|
|
|
false),
|
|
|
|
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),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)))))
|
|
|
|
)))))
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
@ -315,7 +312,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 15,
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
sliderActiveIndex == 1
|
|
|
|
sliderActiveIndex == 1
|
|
|
|
? Column(
|
|
|
|
? Column(
|
|
|
|
@ -452,31 +449,37 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topRight: Radius.circular(50),
|
|
|
|
topRight: Radius.circular(50),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
padding: EdgeInsets.only(left: 20, top: 10, right: 20),
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 15,
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: 150,
|
|
|
|
width: 150,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).patient,
|
|
|
|
TranslationBase.of(context).patients,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.5,
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
height: .5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).services,
|
|
|
|
TranslationBase.of(context).services,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3,
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 22,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
)
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -509,6 +512,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.patientsreferral,
|
|
|
|
.patientsreferral,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
|
|
|
fontSize: 15,
|
|
|
|
))
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -544,6 +548,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.arrivalpatient,
|
|
|
|
.arrivalpatient,
|
|
|
|
color: Colors.black,
|
|
|
|
color: Colors.black,
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
|
|
|
fontSize: 15,
|
|
|
|
))
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -578,7 +583,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
.searchmedicinepatient,
|
|
|
|
.searchmedicinepatient,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
fontSize: 14,
|
|
|
|
fontSize: 13,
|
|
|
|
))
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -823,20 +828,20 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
List<Widget> getSwipeWidget(model) {
|
|
|
|
List<Widget> getSwipeWidget(model) {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
RoundedContainer(
|
|
|
|
RoundedContainer(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.32,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
margin: 5,
|
|
|
|
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.32,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
margin: 5,
|
|
|
|
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.24,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
margin: 5,
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
child:
|
|
|
|
child:
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
@ -854,12 +859,32 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
child: AppText(
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
TranslationBase.of(context).referral,
|
|
|
|
child: Column(
|
|
|
|
fontSize: 20,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.patients,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
height: .5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.all(10))),
|
|
|
|
Text(
|
|
|
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.referral,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontFamily: 'Poppins'),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
))),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
flex: 2,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
@ -917,4 +942,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));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|