dashboard changes

merge-requests/514/head
Sultan Khan 4 years ago
parent 5667f03168
commit 4ed8f716db

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

@ -33,6 +33,7 @@ const Map<String, Map<String, String>> localizedValues = {
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'},
'patients': {'en': "Patient's", 'ar': ' مريض'},
'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'},
'lab': {'en': 'Lab', 'ar': 'المختبر'},
'result': {'en': 'Result', 'ar': 'نتيجة'},
@ -148,7 +149,7 @@ const Map<String, Map<String, String>> localizedValues = {
'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'},
'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '},
'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'},
'services': {'en': 'Services', 'ar': 'الخدمات'},
'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'},
'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'},
'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'},

File diff suppressed because one or more lines are too long

@ -131,7 +131,8 @@ class DoctorApp {
IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results2 =
IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout =
@ -202,14 +203,14 @@ class DoctorApp {
IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData external_link =
IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_face =
// IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_sms =
// IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_face_2 =
IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms_2 =
IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home =
IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_finger =
// IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger_2 =
IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_active =
IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply =
@ -350,12 +351,16 @@ class DoctorApp {
IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_active_1 =
IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_whtsapp =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger =
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_face =
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe8a3, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger =
IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_whtsapp =
IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms =
IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData 124 = IconData(0xe8a7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu =
IconData(0xe8ad, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -40,25 +40,27 @@ class _LandingPageState extends State<LandingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0
? Text(getText(currentTab).toUpperCase())
: Text(''),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(DoctorApp.drawer_icon),
iconSize: 15,
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
),
centerTitle: true,
),
appBar: currentTab != 0
? AppBar(
elevation: 0,
backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0
? Text(getText(currentTab).toUpperCase())
: SizedBox(),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(DoctorApp.drawer_icon),
iconSize: 15,
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
),
centerTitle: true,
)
: MyAppbar(),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
@ -70,13 +72,17 @@ class _LandingPageState extends State<LandingPage> {
),
MyScheduleScreen(),
QrReaderScreen(),
DoctorReplyScreen(changeCurrentTab:(){
_changeCurrentTab(0);
},),
DoctorReplyScreen(
changeCurrentTab: () {
_changeCurrentTab(0);
},
),
],
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab,index: currentTab,),
bottomNavigationBar: BottomNavBar(
changeIndex: _changeCurrentTab,
index: currentTab,
),
);
}
@ -93,3 +99,16 @@ class _LandingPageState extends State<LandingPage> {
}
}
}
class MyAppbar extends StatelessWidget with PreferredSizeWidget {
@override
final Size preferredSize;
MyAppbar({Key key})
: preferredSize = Size.fromHeight(0.0),
super(key: key);
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -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));
}
}

@ -535,88 +535,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
? _locationBar(context, model)
: Container(),
),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceEvenly,
// children: [
// AppButton(
// title: TranslationBase.of(context)
// .all,
// onPressed: () {
// setState(() {
// selectedFilter = 1;
// filterPatients();
// });
// },
// color: selectedFilter == 1
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 1
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .today,
// onPressed: () {
// setState(() {
// selectedFilter = 2;
// filterPatients();
// });
// },
// color: selectedFilter == 2
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 2
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .tomorrow,
// onPressed: () {
// setState(() {
// selectedFilter = 3;
// filterPatients();
// });
// },
// color: selectedFilter == 3
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 3
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .nextWeek,
// onPressed: () {
// setState(() {
// selectedFilter = 4;
// // filterPatients();
// });
// },
// color: selectedFilter == 4
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 4
// ? Colors.white
// : Colors.black,
// ),
// ],
// ),
SizedBox(
height: 10.0,
),
// Divider(
// thickness: 0.8,
// color: Color(0xffCCCCCC),
// ),
Container(
// decoration: BoxDecoration(
// color: Color(0Xffffffff),
// borderRadius:
// BorderRadius.circular(20)),
child: (responseModelList.length >
0)
? Column(
@ -673,14 +595,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
)
],
),
)
// : Center(
// child: DrAppEmbeddedError(
// error: TranslationBase.of(
// context)
// .youDontHaveAnyPatient),
// ),
),
)),
],
),
)

@ -76,7 +76,7 @@ class TranslationBase {
String get searchAbout => localizedValues['searchAbout'][locale.languageCode];
String get patient => localizedValues['patient'][locale.languageCode];
String get patients => localizedValues['patients'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode];
String get todayStatistics =>
@ -1227,7 +1227,8 @@ class TranslationBase {
localizedValues['patientIDMobilenational'][locale.languageCode];
String get updateNow => localizedValues['updateNow'][locale.languageCode];
String get updateTheApp => localizedValues['updateTheApp'][locale.languageCode];
String get updateTheApp =>
localizedValues['updateTheApp'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -39,7 +39,7 @@ class _DashboardItemTextsState extends State<DashboardItemIconText> {
@override
Widget build(BuildContext context) {
return new RoundedContainer(
margin: 10,
margin: EdgeInsets.all(10),
child: Stack(
children: <Widget>[
Align(

@ -60,7 +60,7 @@ class _DashboardItemTextsState extends State<DashboardItemTexts> {
backgroundColor: widget.backgroundColor,
showBorder: widget.showBorder,
borderColor: widget.borderColor,
margin: 4,
margin: EdgeInsets.all(4),
);
}
}

@ -67,7 +67,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
backgroundColor: widget.backgroundColor,
showBorder: widget.showBorder,
borderColor: widget.borderColor,
margin: 4,
margin: EdgeInsets.all(4),
raduis: 10,
);
}

@ -31,7 +31,6 @@ class _AppDrawerState extends State<AppDrawer> {
Helpers helpers = new Helpers();
ProjectViewModel projectsProvider;
@override
Widget build(BuildContext context) {
AuthViewModel authProvider = Provider.of(context);
@ -60,7 +59,7 @@ class _AppDrawerState extends State<AppDrawer> {
),
Container(
child: InkWell(
onTap: (){
onTap: () {
Navigator.pop(context);
},
child: Icon(
@ -130,9 +129,7 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.myQRCode,
TranslationBase.of(context).myQRCode,
icon: DoctorApp.qr_code_3,
// subTitle: ,
),
@ -143,11 +140,8 @@ class _AppDrawerState extends State<AppDrawer> {
height: 80,
child: Image.asset('assets/images/qr_code.png'),
),
onTap: () {
},
onTap: () {},
),
],
),
),
@ -161,16 +155,13 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell(
child: DrawerItem(
projectsProvider.isArabic
? TranslationBase
.of(context)
.lanEnglish
: TranslationBase
.of(context)
.lanArabic,
? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic,
// icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic
? 'assets/images/usa-flag.png'
: 'assets/images/saudi-arabia-flag.png',),
: 'assets/images/saudi-arabia-flag.png',
),
onTap: () {
if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en');
@ -181,16 +172,15 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 10),
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.logout, icon: DoctorApp.logout_1,),
TranslationBase.of(context).logout,
icon: DoctorApp.logout_1,
),
onTap: () async {
Navigator.pop(context);
await helpers.logout();
projectsProvider.isLogin = false;
},
),
],
),
),
@ -205,40 +195,43 @@ class _AppDrawerState extends State<AppDrawer> {
alignment: FractionalOffset.bottomCenter,
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width *0.3,
child: RichText(
text: TextSpan(
text: 'Powered by',
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.3,
child: RichText(
text: TextSpan(
text: 'Powered by',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.bold,
fontSize: 14,
fontFamily: 'Poppins',
),
children: <TextSpan>[
TextSpan(
text: ' Cloud Solutions',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.bold,
fontSize: 14,
fontFamily: 'Poppins',),
children: <TextSpan>[
TextSpan(text: ' Cloud Solutions',
style: TextStyle(
color: Color(0xFF2E303A),
fontSize: 15,
fontFamily: 'Poppins',),
)
]
),),
),
// Text("Powered by"),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 20,
)
],
color: Color(0xFF2E303A),
fontSize: 15,
fontFamily: 'Poppins',
),
)
]),
),
),
// Text("Powered by"),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 20,
)
],
))))
]))
])),
),
width: SizeConfig.realScreenWidth * 0.60,
margin: 0,
margin: EdgeInsets.all(0),
customCornerRaduis: false,
// topRight: 30,

@ -9,7 +9,7 @@ class RoundedContainer extends StatefulWidget {
final double height;
final double raduis;
final Color backgroundColor;
final double margin;
final EdgeInsets margin;
final double elevation;
final bool showBorder;
final Color borderColor;
@ -27,7 +27,7 @@ class RoundedContainer extends StatefulWidget {
this.height,
this.raduis = 10,
this.backgroundColor = Colors.white,
this.margin = 10,
this.margin,
this.elevation = 1,
this.showBorder = false,
this.borderColor = Colors.red,
@ -48,7 +48,7 @@ class _RoundedContainerState extends State<RoundedContainer> {
return Container(
width: widget.width,
height: widget.height,
margin: EdgeInsets.all(widget.margin),
margin: widget.margin,
decoration: widget.showBorder == true
? BoxDecoration(
color: Theme.of(context).primaryColor,

Loading…
Cancel
Save