diff --git a/assets/images/saudi-arabia-flag.png b/assets/images/saudi-arabia-flag.png new file mode 100644 index 00000000..932eb11a Binary files /dev/null and b/assets/images/saudi-arabia-flag.png differ diff --git a/assets/images/usa-flag.png b/assets/images/usa-flag.png new file mode 100644 index 00000000..63c17641 Binary files /dev/null and b/assets/images/usa-flag.png differ diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 283649aa..1e9e2459 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -57,25 +57,25 @@ class _ProfileScreenState extends State { children: [ DrawerItem( TranslationBase.of(context).gender, - Icons.person_pin, + icon: Icons.person_pin, color: Colors.black, subTitle: doctorProfile.genderDescription //"Male" , ), - DrawerItem(TranslationBase.of(context).clinic, Icons.build, + DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build, color: Colors.black, subTitle: doctorProfile.clinicDescription //"Neurology Clinic", ), DrawerItem( TranslationBase.of(context).hospital, - Icons.local_hospital, + icon: Icons.local_hospital, color: Colors.black, subTitle: doctorProfile.projectName, //"Al-Takkassussi", ), DrawerItem( TranslationBase.of(context).speciality, - Icons.crop_square, + icon: Icons.crop_square, color: Colors.black, subTitle: doctorProfile.doctorRate == 0 ? TranslationBase.of(context).beingBad diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 324269c6..ee4e7aaf 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -113,7 +113,7 @@ class _AppDrawerState extends State { InkWell( child: DrawerItem( TranslationBase.of(context).applyOrRescheduleLeave, - DoctorApp.reschedule__1, + icon: DoctorApp.reschedule__1, // subTitle: , ), onTap: () { @@ -129,8 +129,10 @@ class _AppDrawerState extends State { SizedBox(height: 15), InkWell( child: DrawerItem( - TranslationBase.of(context).myQRCode, - DoctorApp.qr_code_3, + TranslationBase + .of(context) + .myQRCode, + icon: DoctorApp.qr_code_3, // subTitle: , ), ), @@ -149,7 +151,7 @@ class _AppDrawerState extends State { ), ), SizedBox( - height: 130, + height: MediaQuery.of(context).size.height * 0.09, ), Container( margin: EdgeInsets.symmetric(horizontal: 20), @@ -157,10 +159,17 @@ class _AppDrawerState extends State { children: [ InkWell( child: DrawerItem( - projectsProvider.isArabic - ? TranslationBase.of(context).lanEnglish - : TranslationBase.of(context).lanArabic, - DoctorApp.qr_code), + projectsProvider.isArabic + ? 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',), onTap: () { if (projectsProvider.isArabic) projectsProvider.changeLanguage('en'); @@ -171,7 +180,9 @@ class _AppDrawerState extends State { SizedBox(height: 10), InkWell( child: DrawerItem( - TranslationBase.of(context).logout, DoctorApp.logout_1), + TranslationBase + .of(context) + .logout, icon: DoctorApp.logout_1,), onTap: () async { Navigator.pop(context); await helpers.logout(); diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index 1a34a8ca..3dcac4c9 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -15,8 +15,9 @@ class DrawerItem extends StatefulWidget { final String subTitle; final IconData icon; final Color color; + final String assetLink; - DrawerItem(this.title, this.icon, {this.color, this.subTitle = ''}); + DrawerItem(this.title, {this.icon, this.color, this.subTitle = '', this.assetLink}); @override _DrawerItemState createState() => _DrawerItemState(); @@ -30,6 +31,13 @@ class _DrawerItemState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ + if(widget.assetLink!=null) + Container( + height: 20, + width: 20, + child: Image.asset(widget.assetLink), + ), + if(widget.assetLink==null) Icon( widget.icon, color: widget.color ?? Colors.black87,