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>[
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

@ -113,7 +113,7 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell(
child: DrawerItem(
TranslationBase.of(context).applyOrRescheduleLeave,
DoctorApp.reschedule__1,
icon: DoctorApp.reschedule__1,
// subTitle: ,
),
onTap: () {
@ -129,8 +129,10 @@ class _AppDrawerState extends State<AppDrawer> {
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<AppDrawer> {
),
),
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<AppDrawer> {
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<AppDrawer> {
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();

@ -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<DrawerItem> {
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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,

Loading…
Cancel
Save