Merge remote-tracking branch 'origin/update-to-3.32-sdk' into update-to-3.32-sdk

updare-to-3.32.sultan
Sultan khan 6 months ago
commit 85ca2373e5

@ -0,0 +1,4 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.2494 17.6548C16.2659 17.2409 15.9437 16.8921 15.5298 16.8756C15.1159 16.8592 14.767 17.1814 14.7506 17.5953C14.693 19.044 13.4856 20.2895 11.834 20.2491C11.4722 20.2403 10.993 20.1115 9.75473 19.7622C6.95545 18.9726 4.85508 17.7352 4.34554 15.1372C4.25341 14.6675 4.25001 14.1268 4.25001 12.8373L4.25001 11.1628C4.25001 9.87329 4.25341 9.33257 4.34554 8.86283C4.85508 6.26485 6.95545 5.02745 9.75474 4.23787C10.993 3.88859 11.4722 3.75982 11.834 3.75097C13.4856 3.71056 14.693 4.95605 14.7506 6.40481C14.767 6.81869 15.1159 7.14088 15.5298 7.12443C15.9437 7.10798 16.2659 6.75913 16.2494 6.34524C16.1598 4.09011 14.2806 2.19067 11.7973 2.25142C11.2204 2.26553 10.5421 2.45699 9.47809 2.75735L9.34752 2.7942C6.42379 3.61889 3.55604 5.09449 2.87359 8.57414C2.74987 9.20493 2.74992 9.9012 2.75 11.0693L2.75 12.9308C2.74992 14.0989 2.74987 14.7951 2.87359 15.4259C3.55604 18.9056 6.42379 20.3812 9.34752 21.2059L9.47811 21.2427C10.5421 21.5431 11.2204 21.7345 11.7973 21.7487C14.2806 21.8094 16.1598 19.9099 16.2494 17.6548Z" fill="white"/>
<path d="M13.5228 10.0378C13.8198 9.74911 13.8265 9.27428 13.5378 8.97726C13.2491 8.68023 12.7743 8.67349 12.4773 8.96219C12.386 9.05089 12.2042 9.19651 11.9328 9.40971L11.8729 9.45676C11.6307 9.64682 11.3466 9.86981 11.0755 10.0995C10.785 10.3457 10.4832 10.6213 10.2486 10.8968C10.131 11.0348 10.015 11.1904 9.92543 11.3578C9.83904 11.5193 9.75002 11.7417 9.75002 12C9.75002 12.2583 9.83904 12.4807 9.92543 12.6422C10.015 12.8096 10.131 12.9652 10.2486 13.1032C10.4832 13.3787 10.785 13.6543 11.0755 13.9005C11.3466 14.1302 11.6307 14.3532 11.8728 14.5432L11.9328 14.5903C12.2042 14.8035 12.386 14.9491 12.4773 15.0378C12.7743 15.3265 13.2491 15.3198 13.5378 15.0227C13.8265 14.7257 13.8198 14.2509 13.5228 13.9622C13.3612 13.8051 13.1041 13.6029 12.8593 13.4107L12.8024 13.3659C12.5566 13.173 12.2939 12.9667 12.0452 12.7561L12.0381 12.75L21.5 12.75C21.9142 12.75 22.25 12.4142 22.25 12C22.25 11.5858 21.9142 11.25 21.5 11.25L12.0381 11.25L12.0452 11.2439C12.2939 11.0333 12.5566 10.827 12.8024 10.6341L12.8593 10.5893C13.1041 10.3971 13.3612 10.1949 13.5228 10.0378Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -2327,4 +2327,6 @@ const Map localizedValues = {
"liveCareTermsConditions47": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "},
"liveCareTermsConditions48": {"en": "If you have any complaints or concerns about the Application and or the Website, Our Services, or how we handle your personal information please contact us on: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553", "ar": "إذا كانت لديك أي شكاوى أو مخاوف بشأن التطبيق و/أو موقع الويب أو خدماتنا أو كيفية تعاملنا مع معلوماتك الشخصية، فيرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011"},
"clickPrivacyPolicy": {"en": "Please click here to view the privacy policy", "ar": "الرجاء الضغط هنا لعرض سياسة الخصوصية"},
"welcomeToDrSulaiman": {"en": "Welcome to Dr. Sulaiman Al Habib Medical Group", "ar": "مرحباً بكم في مجموعة الدكتور سليمان الحبيب الطبية"},
"dontHaveAccount": {"en": "Dont have an account?", "ar": "ليس لديك حساب؟"}
};

@ -93,7 +93,6 @@ class _WelcomeLogin extends State<WelcomeLogin> {
var healthId;
int _selectedLanguage = 0;
@override
void initState() {
isLoading = true;
@ -104,12 +103,12 @@ class _WelcomeLogin extends State<WelcomeLogin> {
sharedPref.setBool(IS_ROBOT_INIT, false);
sharedPref.remove(CLINICS_LIST);
if (projectViewModel.isArabic) {
_selectedLanguage = value;
_selectedLanguage = 1;
projectViewModel.changeLanguage('en');
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('change language to english');
} else {
_selectedLanguage = value;
_selectedLanguage = 0;
projectViewModel.changeLanguage('ar');
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('change language to arabic');
}
@ -119,98 +118,103 @@ class _WelcomeLogin extends State<WelcomeLogin> {
@override
Widget build(BuildContext context) {
final initialProjectViewModel = Provider.of<ProjectViewModel>(context, listen: false);
projectViewModel = context.read<ProjectViewModel>();
// final initialProjectViewModel = Provider.of<ProjectViewModel>(context, listen: false);
// _selectedLanguage = initialProjectViewModel.isArabic ? 0 : 1;
return Consumer2<ProjectViewModel, ToDoCountProviderModel>(
builder: (context, projectViewModel, toDoProvider, child) {
_selectedLanguage = projectViewModel.isArabic ? 0 : 1;
return AppScaffold(
appBarTitle: TranslationBase.of(context).welcome,
isShowDecPage: false,
isShowAppBar: true,
isshowBackButton: false,
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: false,
showDropDown: true,
isShowLanguageChanger: true,
appBarIcons: [],
dropDownList: [
TranslationBase.of(context).arabicChange,
TranslationBase.of(context).english,
],
dropDownIndexChange: (value) {
changeLanguage(projectViewModel, value!);
},
dropdownIndexValue: _selectedLanguage,
// Use the state variable
body: Column(
children: <Widget>[
Expanded(
child: ListView(
padding: EdgeInsets.only(left: 21, right: 21),
physics: BouncingScrollPhysics(),
children: [
SizedBox(height: 30),
Row(
children: [
SvgPicture.asset(
"assets/images/new/hmg_icon.svg",
height: 62,
width: 62,
),
],
),
// Example of using toDoProvider:
// if (toDoProvider.count > 0) Text("To-Do items: ${toDoProvider.count}"),
],
),
),
Spacer(),
Expanded(
child: Container(
padding: EdgeInsets.only(top: 30, bottom: 0, right: 21, left: 21),
child: Text(
"Welcome to Dr. Sulaiman Al Habib Medical Group",
style: TextStyle(fontSize: 36, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 47 / 36),
return SafeArea(
child: AppScaffold(
appBarTitle: TranslationBase.of(context).welcome,
isShowDecPage: false,
isShowAppBar: true,
isshowBackButton: false,
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: false,
showDropDown: true,
isShowLanguageChanger: true,
appBarIcons: [],
dropDownList: [
// TranslationBase.of(context).arabicChange,
// TranslationBase.of(context).english,
],
dropDownIndexChange: (value) {
changeLanguage(projectViewModel, value!);
},
dropdownIndexValue: _selectedLanguage,
// Use the state variable
body: Column(
children: <Widget>[
Expanded(
child: ListView(
padding: EdgeInsets.only(left: 21, right: 21),
physics: BouncingScrollPhysics(),
children: [
SizedBox(height: 30),
Row(
children: [
SvgPicture.asset(
"assets/images/new/hmg_icon.svg",
height: 62,
width: 62,
),
],
),
),
// Example of using toDoProvider:
// if (toDoProvider.count > 0) Text("To-Do items: ${toDoProvider.count}"),
],
),
Container(
padding: EdgeInsets.only(top: 16, bottom: 10, right: 21, left: 21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Directionality(
textDirection: TextDirection.ltr, // Consider making this dynamic based on language
child: inputWidget(
"National ID. or File No",
"1xxxxxxxx",
nationIdController, // Assumed to be a TextEditingController in your State class
isEnable: true,
prefix: null,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
leadingIcon: "assets/images/svg/student-card.svg",
),
),
],
),
Spacer(),
Container(
padding: EdgeInsets.only(top: 30, bottom: 0, right: 21, left: 21),
child: Text(
TranslationBase.of(context).welcomeToDrSulaiman,
style: TextStyle(
fontSize: 36,
fontFamily: (projectViewModel.currentLanguage == 'ar' ? 'Cairo' : 'Poppins'),
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.4,
height: 47 / 36,
),
),
SizedBox(
height: 15,
),
Container(
padding: EdgeInsets.only(top: 16, bottom: 10, right: 21, left: 21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Directionality(
textDirection: TextDirection.ltr, // Consider making this dynamic based on language
child: inputWidget(
"National ID. or File No",
"1xxxxxxxx",
nationIdController, // Assumed to be a TextEditingController in your State class
isEnable: true,
prefix: null,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
leadingIcon: "assets/images/svg/student-card.svg",
),
),
],
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expanded(
child: Container(
padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).login,
() {
),
SizedBox(
height: 15,
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: CustomButton(
text: TranslationBase.of(context).login,
icon: "assets/images/svg/login1.svg",
onPressed: () {
bool isValid = validateIqama(nationIdController.text);
print("Iqama is valid: $isValid");
@ -280,53 +284,56 @@ class _WelcomeLogin extends State<WelcomeLogin> {
} else {
Utils.showErrorToast("Please enter a valid Iqama number.");
}
},
textColor: Colors.white,
),
),
}),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Colors.black,
fontSize: 16,
height: 26 / 16,
fontFamily: 'poppins',
fontWeight: FontWeight.w500,
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Colors.black,
fontSize: 16,
height: 26 / 16,
fontFamily: 'poppins',
fontWeight: FontWeight.w500,
),
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context).dontHaveAccount,
),
children: <TextSpan>[
TextSpan(text: 'Dont have an account? '),
TextSpan(
text: 'Register now',
style: const TextStyle(
color: Colors.red,
fontSize: 16,
height: 26 / 16,
fontFamily: 'poppins',
fontWeight: FontWeight.w500,
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).push(FadePage(page: RegisterNew()));
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true);
},
TextSpan(text: " "),
TextSpan(
text: TranslationBase.of(context).registerNow,
style: const TextStyle(
color: Colors.red,
fontSize: 16,
height: 26 / 16,
fontFamily: 'poppins',
fontWeight: FontWeight.w500,
),
],
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).push(FadePage(page: RegisterNew()));
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true);
},
),
],
),
],
)
],
),
);
},
),
],
),
SizedBox(
height: 10,
),
],
),
),
);
}

@ -3474,6 +3474,8 @@ class TranslationBase {
String get liveCareTermsConditions47 => localizedValues["liveCareTermsConditions47"][locale.languageCode];
String get liveCareTermsConditions48 => localizedValues["liveCareTermsConditions48"][locale.languageCode];
String get clickPrivacyPolicy => localizedValues["clickPrivacyPolicy"][locale.languageCode];
String get welcomeToDrSulaiman => localizedValues["welcomeToDrSulaiman"][locale.languageCode];
String get dontHaveAccount => localizedValues["dontHaveAccount"][locale.languageCode];
}

@ -31,35 +31,36 @@ class _LanguageSelectorState extends State<LanguageSelector> {
borderRadius: BorderRadius.circular(12),
color: Color(0xFFFEE9EA),
),
height: 40,
width: 93,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
InkWell(
onTap: () {
final newLanguage = widget.currentLanguage == 'ar' ? 'en' : 'ar';
widget.onLanguageChanged(newLanguage);
},
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/images/svg/language.svg", width: 24),
const SizedBox(width: 8),
Text(
currentLangData['name']?.toUpperCase() ?? 'EN',
style: const TextStyle(fontWeight: FontWeight.w500, fontFamily: 'GESSTwo', fontSize: 14, color: Color(0xFFED1C2B)),
),
],
child: InkWell(
onTap: () {
final newLanguage = widget.currentLanguage == 'ar' ? 'en' : 'ar';
print(newLanguage);
widget.onLanguageChanged(newLanguage);
},
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/images/svg/language.svg", width: 24),
const SizedBox(width: 6),
Text(
currentLangData['name']?.toUpperCase() ?? 'EN',
style: TextStyle(
fontWeight: FontWeight.w500,
// fontFamily: 'GESSTwo',
fontFamily: (widget.currentLanguage == 'ar' ? 'Cairo' : 'Poppins'),
fontSize: 14,
color: const Color(0xFFED1C2B),
letterSpacing: 0.1),
),
),
],
),
],
),
),
),
]);

@ -387,6 +387,8 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
titleSpacing: -8,
// centerTitle: false,
title: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (showTitle)
Expanded(
@ -442,15 +444,11 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
child: LanguageSelector(
currentLanguage: dropdownIndexValue == 0 ? 'ar' : 'en',
onLanguageChanged: (String value) {
print(value);
print(value);
dropDownIndexChange!(value == 'ar' ? 0 : 1);
// dropdownIndexValue = value == 'ar' ? 0 : 1;
},
languages: [
{'code': 'ar', 'name': '${TranslationBase.of(context).arabicChange}'},
{'code': 'en', 'name': '${TranslationBase.of(context).english}'}
{'code': 'ar', 'name': '${TranslationBase.of(context).lanEnglish}'},
{'code': 'en', 'name': '${TranslationBase.of(context).lanArabic}'}
],
),
),

Loading…
Cancel
Save