fix flag on slider

merge-requests/473/head
Elham Rababah 5 years ago
parent e47e7c0a00
commit 9d4584097d

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

@ -57,25 +57,25 @@ class _ProfileScreenState extends State<ProfileScreen> {
children: <Widget>[ children: <Widget>[
DrawerItem( DrawerItem(
TranslationBase.of(context).gender, TranslationBase.of(context).gender,
Icons.person_pin, icon: Icons.person_pin,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.genderDescription //"Male" subTitle: doctorProfile.genderDescription //"Male"
, ,
), ),
DrawerItem(TranslationBase.of(context).clinic, Icons.build, DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build,
color: Colors.black, color: Colors.black,
subTitle: subTitle:
doctorProfile.clinicDescription //"Neurology Clinic", doctorProfile.clinicDescription //"Neurology Clinic",
), ),
DrawerItem( DrawerItem(
TranslationBase.of(context).hospital, TranslationBase.of(context).hospital,
Icons.local_hospital, icon: Icons.local_hospital,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.projectName, //"Al-Takkassussi", subTitle: doctorProfile.projectName, //"Al-Takkassussi",
), ),
DrawerItem( DrawerItem(
TranslationBase.of(context).speciality, TranslationBase.of(context).speciality,
Icons.crop_square, icon: Icons.crop_square,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.doctorRate == 0 subTitle: doctorProfile.doctorRate == 0
? TranslationBase.of(context).beingBad ? TranslationBase.of(context).beingBad

@ -113,7 +113,7 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).applyOrRescheduleLeave, TranslationBase.of(context).applyOrRescheduleLeave,
DoctorApp.reschedule__1, icon: DoctorApp.reschedule__1,
// subTitle: , // subTitle: ,
), ),
onTap: () { onTap: () {
@ -129,8 +129,10 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 15), SizedBox(height: 15),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).myQRCode, TranslationBase
DoctorApp.qr_code_3, .of(context)
.myQRCode,
icon: DoctorApp.qr_code_3,
// subTitle: , // subTitle: ,
), ),
), ),
@ -149,7 +151,7 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
SizedBox( SizedBox(
height: 130, height: MediaQuery.of(context).size.height * 0.09,
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 20), margin: EdgeInsets.symmetric(horizontal: 20),
@ -158,9 +160,16 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
projectsProvider.isArabic projectsProvider.isArabic
? TranslationBase.of(context).lanEnglish ? TranslationBase
: TranslationBase.of(context).lanArabic, .of(context)
DoctorApp.qr_code), .lanEnglish
: TranslationBase
.of(context)
.lanArabic,
// icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic
? 'assets/images/usa-flag.png'
: 'assets/images/saudi-arabia-flag.png',),
onTap: () { onTap: () {
if (projectsProvider.isArabic) if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en'); projectsProvider.changeLanguage('en');
@ -171,7 +180,9 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 10), SizedBox(height: 10),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).logout, DoctorApp.logout_1), TranslationBase
.of(context)
.logout, icon: DoctorApp.logout_1,),
onTap: () async { onTap: () async {
Navigator.pop(context); Navigator.pop(context);
await helpers.logout(); await helpers.logout();

@ -15,8 +15,9 @@ class DrawerItem extends StatefulWidget {
final String subTitle; final String subTitle;
final IconData icon; final IconData icon;
final Color color; 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 @override
_DrawerItemState createState() => _DrawerItemState(); _DrawerItemState createState() => _DrawerItemState();
@ -30,6 +31,13 @@ class _DrawerItemState extends State<DrawerItem> {
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if(widget.assetLink!=null)
Container(
height: 20,
width: 20,
child: Image.asset(widget.assetLink),
),
if(widget.assetLink==null)
Icon( Icon(
widget.icon, widget.icon,
color: widget.color ?? Colors.black87, color: widget.color ?? Colors.black87,

Loading…
Cancel
Save