From 40cbca565a72bd4c958c30ef5d152ed34ac9f28e Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 13 Oct 2021 18:06:52 +0300 Subject: [PATCH] fixes --- .../e_referral_service.dart | 2 - .../AppoimentAllHistoryResultList.dart | 2 +- lib/pages/DrawerPages/family/my-family.dart | 52 ++++++++++++------- lib/pages/MyAppointments/MyAppointments.dart | 1 - lib/widgets/buttons/defaultButton.dart | 5 +- 5 files changed, 38 insertions(+), 24 deletions(-) diff --git a/lib/core/service/AlHabibMedicalService/e_referral_service.dart b/lib/core/service/AlHabibMedicalService/e_referral_service.dart index b1d716a9..7fcc5f19 100644 --- a/lib/core/service/AlHabibMedicalService/e_referral_service.dart +++ b/lib/core/service/AlHabibMedicalService/e_referral_service.dart @@ -117,8 +117,6 @@ class EReferralService extends BaseService { _allReferral.clear(); hasError = false; - searchEReferralRequestModel.patientMobileNumber = "966545156035"; - // TODO return this code when the fix the server await baseAppClient.post(GET_E_REFERRALS, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart index f14e23d0..a79767c5 100644 --- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart +++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart @@ -39,7 +39,7 @@ class AppoitmentAllHistoryResultList { String doctorImageURL; String doctorNameObj; int doctorRate; - double decimalDoctorRate; + dynamic decimalDoctorRate; List doctorSpeciality; String doctorTitle; int gender; diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index c3e136a0..8d0042e2 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -1,5 +1,6 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; @@ -34,7 +35,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; class MyFamily extends StatefulWidget { final bool isAppbarVisible; @@ -192,24 +192,40 @@ class _MyFamily extends State with TickerProviderStateMixin { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - children: [ - CupertinoSwitch( - value: isSwitchUser, - onChanged: (value) { - setState(() { - isSwitchUser = value; - }); - if (isSwitchUser == true) switchUser(snapshot.data.getAllSharedRecordsByStatusList[index], context); - }, - ), - Texts( - TranslationBase.of(context).switchUser, - color: Colors.white, - fontSize: 12, - ) - ], + Container( + margin: EdgeInsets.only(top: 5.0), + width: 100.0, + child: DefaultButton( + TranslationBase.of(context).switchUser, + () { + // setState(() { + // isSwitchUser = value; + // }); + switchUser(snapshot.data.getAllSharedRecordsByStatusList[index], AppGlobal.context); + }, + fontSize: 12.0, + color: Colors.white, + textColor: Colors.black, + ), ), + // Row( + // children: [ + // CupertinoSwitch( + // value: isSwitchUser, + // onChanged: (value) { + // setState(() { + // isSwitchUser = value; + // }); + // if (isSwitchUser == true) switchUser(snapshot.data.getAllSharedRecordsByStatusList[index], context); + // }, + // ), + // Texts( + // TranslationBase.of(context).switchUser, + // color: Colors.white, + // fontSize: 12, + // ) + // ], + // ), InkWell( onTap: () { deleteFamily(snapshot.data.getAllSharedRecordsByStatusList[index], context); diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index 38fbdce9..b65c5235 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -167,7 +167,6 @@ class _MyAppointmentsState extends State with SingleTickerProvid GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - Navigator.of(context).pop(); }); } diff --git a/lib/widgets/buttons/defaultButton.dart b/lib/widgets/buttons/defaultButton.dart index c1d6fb3d..22430242 100644 --- a/lib/widgets/buttons/defaultButton.dart +++ b/lib/widgets/buttons/defaultButton.dart @@ -7,7 +7,8 @@ class DefaultButton extends StatelessWidget { final Color color; final Color disabledColor; final IconData iconData; - DefaultButton(this.text, this.onPress, {this.color, this.disabledColor, this.textColor = Colors.white, this.iconData}); + final double fontSize; + DefaultButton(this.text, this.onPress, {this.color, this.disabledColor, this.textColor = Colors.white, this.iconData, this.fontSize}); @override Widget build(BuildContext context) { @@ -23,7 +24,7 @@ class DefaultButton extends StatelessWidget { child: Text( text, textAlign: TextAlign.center, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48), + style: TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48), ), ), ],