Merge branch 'sultan' into 'development'

Sultan

See merge request Cloud_Solution/doctor_app_flutter!514
merge-requests/513/merge
Mohammad Aljammal 5 years ago
commit 1044f1d4e3

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': 'البحث عن مريض'}, 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'}, 'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'}, 'patient': {'en': 'Patient', 'ar': ' مريض'},
'patients': {'en': "Patient's", 'ar': ' مريض'},
'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'}, 'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'},
'lab': {'en': 'Lab', 'ar': 'المختبر'}, 'lab': {'en': 'Lab', 'ar': 'المختبر'},
'result': {'en': 'Result', 'ar': 'نتيجة'}, 'result': {'en': 'Result', 'ar': 'نتيجة'},
@ -148,7 +149,7 @@ const Map<String, Map<String, String>> localizedValues = {
'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'}, 'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'},
'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '}, 'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '},
'home': {'en': 'Home', 'ar': 'الرئيسية'}, 'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, 'services': {'en': 'Services', 'ar': 'الخدمات'},
'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'}, 'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'},
'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'}, 'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'},
'faceId': {'en': 'Face ID', '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); IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit = static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results2 =
IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves = static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout = static const IconData logout =
@ -202,14 +203,14 @@ class DoctorApp {
IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData external_link = static const IconData external_link =
IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_face = static const IconData verify_face_2 =
// IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_sms = static const IconData verify_sms_2 =
// IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home = static const IconData home =
IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_finger = static const IconData verify_finger_2 =
// IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_active = static const IconData dr_reply_active =
IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply = static const IconData dr_reply =
@ -350,12 +351,16 @@ class DoctorApp {
IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_active_1 = static const IconData home_active_1 =
IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); 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 = 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,13 +40,14 @@ class _LandingPageState extends State<LandingPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: currentTab != 0
? AppBar(
elevation: 0, elevation: 0,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0 title: currentTab != 0
? Text(getText(currentTab).toUpperCase()) ? Text(getText(currentTab).toUpperCase())
: Text(''), : SizedBox(),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return IconButton( return IconButton(
@ -58,7 +59,8 @@ class _LandingPageState extends State<LandingPage> {
}, },
), ),
centerTitle: true, centerTitle: true,
), )
: MyAppbar(),
drawer: SafeArea(child: AppDrawer()), drawer: SafeArea(child: AppDrawer()),
extendBody: true, extendBody: true,
body: PageView( body: PageView(
@ -70,13 +72,17 @@ class _LandingPageState extends State<LandingPage> {
), ),
MyScheduleScreen(), MyScheduleScreen(),
QrReaderScreen(), QrReaderScreen(),
DoctorReplyScreen(changeCurrentTab:(){ DoctorReplyScreen(
changeCurrentTab: () {
_changeCurrentTab(0); _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,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));
}
} }

@ -535,88 +535,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
? _locationBar(context, model) ? _locationBar(context, model)
: Container(), : 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( SizedBox(
height: 10.0, height: 10.0,
), ),
// Divider(
// thickness: 0.8,
// color: Color(0xffCCCCCC),
// ),
Container( Container(
// decoration: BoxDecoration(
// color: Color(0Xffffffff),
// borderRadius:
// BorderRadius.circular(20)),
child: (responseModelList.length > child: (responseModelList.length >
0) 0)
? Column( ? 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 searchAbout => localizedValues['searchAbout'][locale.languageCode];
String get patient => localizedValues['patient'][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 labResult => localizedValues['labResult'][locale.languageCode];
String get todayStatistics => String get todayStatistics =>
@ -1227,7 +1227,8 @@ class TranslationBase {
localizedValues['patientIDMobilenational'][locale.languageCode]; localizedValues['patientIDMobilenational'][locale.languageCode];
String get updateNow => localizedValues['updateNow'][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> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

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

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

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

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

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

Loading…
Cancel
Save