diff --git a/assets/images/svg/apple-finder.svg b/assets/images/svg/apple-finder.svg
new file mode 100644
index 00000000..014083f9
--- /dev/null
+++ b/assets/images/svg/apple-finder.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/svg/language.svg b/assets/images/svg/language.svg
new file mode 100644
index 00000000..0a976449
--- /dev/null
+++ b/assets/images/svg/language.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/svg/note-edit.svg b/assets/images/svg/note-edit.svg
new file mode 100644
index 00000000..daed336b
--- /dev/null
+++ b/assets/images/svg/note-edit.svg
@@ -0,0 +1,6 @@
+
diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart
index 15830687..be838407 100644
--- a/lib/core/viewModels/project_view_model.dart
+++ b/lib/core/viewModels/project_view_model.dart
@@ -155,7 +155,6 @@ class ProjectViewModel extends BaseViewModel {
currentLanguage = 'en';
sharedPref.setString(APP_LANGUAGE, 'en');
}
-
notifyListeners();
}
diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart
index 3ab54304..57be605c 100644
--- a/lib/pages/login/welcome.dart
+++ b/lib/pages/login/welcome.dart
@@ -24,12 +24,15 @@ import 'package:hmg_patient_app/pages/rateAppointment/rate_appointment_doctor.da
import 'package:hmg_patient_app/services/authentication/auth_provider.dart';
import 'package:hmg_patient_app/services/clinic_services/get_clinic_service.dart';
import 'package:hmg_patient_app/theme/colors.dart';
+import 'package:hmg_patient_app/theme/theme_notifier.dart';
+import 'package:hmg_patient_app/theme/theme_value.dart';
import 'package:hmg_patient_app/uitl/app_shared_preferences.dart';
import 'package:hmg_patient_app/uitl/app_toast.dart';
import 'package:hmg_patient_app/uitl/gif_loader_dialog_utils.dart';
import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
import 'package:hmg_patient_app/uitl/utils.dart';
import 'package:hmg_patient_app/widgets/buttons/defaultButton.dart';
+import 'package:hmg_patient_app/widgets/drawer/langauge_picker.dart';
import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart';
import 'package:hmg_patient_app/widgets/otp/sms-popup.dart';
import 'package:hmg_patient_app/widgets/text/app_texts_widget.dart';
@@ -74,7 +77,6 @@ class _WelcomeLogin extends State {
late ToDoCountProviderModel toDoProvider;
-
late int selectedOption;
bool onlySMSBox = false;
@@ -89,6 +91,8 @@ class _WelcomeLogin extends State {
var dob;
late int isHijri;
var healthId;
+ int _selectedLanguage = 0;
+
@override
void initState() {
@@ -96,212 +100,459 @@ class _WelcomeLogin extends State {
super.initState();
}
- Widget build(BuildContext context) {
+ void changeLanguage(ProjectViewModel projectViewModel, int value) {
+ sharedPref.setBool(IS_ROBOT_INIT, false);
+ sharedPref.remove(CLINICS_LIST);
+ if (projectViewModel.isArabic) {
+ _selectedLanguage = value;
+ projectViewModel.changeLanguage('en');
+
+ locator().hamburgerMenu.logMenuItemClick('change language to english');
+ } else {
+ _selectedLanguage = value;
+ projectViewModel.changeLanguage('ar');
+ locator().hamburgerMenu.logMenuItemClick('change language to arabic');
+ }
+ var themeNotifier = Provider.of(context, listen: false);
+ themeNotifier.setTheme(defaultTheme(fontName: projectViewModel.isArabic ? 'Cairo' : 'Poppins'));
+ }
- projectViewModel = Provider.of(context);
- toDoProvider = Provider.of(context);
-
- return AppScaffold(
- appBarTitle: TranslationBase.of(context).welcome,
- isShowDecPage: false,
- isShowAppBar: true,
- isshowBackButton: false,
- showNewAppBar: true,
- backgroundColor: Color(0xffF8F8F8),
- showNewAppBarTitle: false,
- body: Column(
- children: [
- Expanded(
- child: ListView(
- padding: EdgeInsets.only(left: 21, right: 21),
- physics: BouncingScrollPhysics(),
- children: [
- SizedBox(height: 30),
- Row(
+ @override
+ Widget build(BuildContext context) {
+ final initialProjectViewModel = Provider.of(context, listen: false);
+ // _selectedLanguage = initialProjectViewModel.isArabic ? 0 : 1;
+
+ return Consumer2(
+ 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: [
+ Expanded(
+ child: ListView(
+ padding: EdgeInsets.only(left: 21, right: 21),
+ physics: BouncingScrollPhysics(),
children: [
- SvgPicture.asset(
- "assets/images/new/hmg_icon.svg",
- height: 62,
- width: 62,
+ 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(
- // TranslationBase.of(context).welcome,
- "Welcome to Dr. Sulaiman Al Habib Medical Group",
- style: TextStyle(fontSize: 36, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 47 / 36),
),
- ),
- ),
- Container(
- padding: EdgeInsets.only(top: 16, bottom: 10, right: 21, left: 21),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- Directionality(
- textDirection: TextDirection.ltr,
- child: inputWidget(
- "National ID. or File No",
- "1xxxxxxxx",
- nationIdController,
- isEnable: true,
- prefix: null,
- hasSelection: false,
- isBorderAllowed: false,
- isAllowLeadingIcon: true,
- leadingIcon: "assets/images/svg/student-card.svg",
- ),
- ),
- ],
- ),
- ),
- SizedBox(
- height: 15,
- ),
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
+ Spacer(),
Expanded(
child: Container(
- padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21),
- child: DefaultButton(
- TranslationBase.of(context).login,
- () {
- bool isValid = validateIqama(nationIdController.text);
- print("Iqama is valid: $isValid");
-
- if (isValid) {
- showModalBottomSheet(
- context: context,
- isScrollControlled: true,
- isDismissible: false,
- backgroundColor: Colors.transparent,
- builder: (context) => Padding(
- padding: EdgeInsets.only(
- bottom: MediaQuery.of(context).viewInsets.bottom,
- ),
- child: SingleChildScrollView(
- child: GenericBottomSheet(
- countryCode: "966", // Default is +966 as in your example
- initialPhoneNumber: "", //
- textController: phoneController,
- buttons: [
- Padding(
- padding: const EdgeInsets.only(bottom: 10),
- child: CustomButton(
- text: "Send me OTP on SMS",
- onPressed: () {
- onOtpBtnPressed(OTPType.sms);
- },
- backgroundColor: Colors.red,
- borderColor: Colors.red,
- textColor: Colors.white,
- icon: "assets/images/svg/message.svg",
- ),
- ),
- Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
+ 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),
+ ),
+ ),
+ ),
+ 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",
+ ),
+ ),
+ ],
+ ),
+ ),
+ SizedBox(
+ height: 15,
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Expanded(
+ child: Container(
+ padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21),
+ child: DefaultButton(
+ TranslationBase.of(context).login,
+ () {
+ bool isValid = validateIqama(nationIdController.text);
+ print("Iqama is valid: $isValid");
+
+ if (isValid) {
+ showModalBottomSheet(
+ context: context,
+ isScrollControlled: true,
+ isDismissible: false,
+ backgroundColor: Colors.transparent,
+ builder: (bottomSheetContext) => Padding(
+ // Use a different context name
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom,
+ ),
+ child: SingleChildScrollView(
+ child: GenericBottomSheet(
+ countryCode: "966",
+ initialPhoneNumber: "",
+ textController: phoneController, // Assumed to be a TextEditingController
+ buttons: [
+ Padding(
+ padding: const EdgeInsets.only(bottom: 10),
+ child: CustomButton(
+ text: "Send me OTP on SMS",
+ onPressed: () {
+ onOtpBtnPressed(OTPType.sms);
+ },
+ backgroundColor: Colors.red,
+ borderColor: Colors.red,
+ textColor: Colors.white,
+ icon: "assets/images/svg/message.svg",
+ ),
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 8),
+ child: AppText(
+ "OR",
+ fontSize: 16,
+ fontFamily: 'poppins',
+ color: Color(0xFF2E3039),
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ],
+ ),
Padding(
- padding: const EdgeInsets.symmetric(horizontal: 8),
- child: AppText(
- "OR",
- fontSize: 16,
- fontFamily: 'poppins',
- color: Color(0xFF2E3039),
- fontWeight: FontWeight.w500,
+ padding: const EdgeInsets.only(bottom: 10),
+ child: CustomButton(
+ text: "Send me OTP on WhatsApp",
+ onPressed: () {
+ onOtpBtnPressed(OTPType.whatsapp);
+ },
+ backgroundColor: Colors.white,
+ borderColor: Color(0xFF2E3039),
+ textColor: Color(0xFF2E3039),
+ icon: "assets/images/svg/whatsapp.svg",
),
),
],
),
- Padding(
- padding: const EdgeInsets.only(bottom: 10),
- child: CustomButton(
- text: "Send me OTP on WhatsApp",
- onPressed: () {
- onOtpBtnPressed(OTPType.whatsapp);
- },
- backgroundColor: Colors.white,
- borderColor: Color(0xFF2E3039),
- textColor: Color(0xFF2E3039),
- icon: "assets/images/svg/whatsapp.svg",
- ),
- ),
- ],
- ),
- ),
- ));
- } else {
- Utils.showErrorToast("Please enter a valid Iqama number.");
- }
- },
- // color: CustomColors.,
- textColor: Colors.white,
+ ),
+ ));
+ } else {
+ Utils.showErrorToast("Please enter a valid Iqama number.");
+ }
+ },
+ textColor: Colors.white,
+ ),
+ ),
),
- ),
+ ],
),
- // SizedBox(width: 8),
- // Expanded(
- // child: DefaultButton(
- // TranslationBase.of(context).yes,
- // () => {
- // Navigator.of(context).push(FadePage(page: LoginType())),
- // locator().loginRegistration.visited_alhabib_group(true),
- // },
- // color: CustomColors.green,
- // ),
- // ),
- ],
- ),
- 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(text: 'Don’t have an account? '),
- TextSpan(
- text: 'Register now',
- style: const TextStyle(
- color: Colors.red,
+ 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,
),
- recognizer: TapGestureRecognizer()
- ..onTap = () {
- Navigator.of(context).push(FadePage(page: RegisterNew()));
- // Example: Navigator.push(context, MaterialPageRoute(builder: (context) => RegisterScreen()));
- },
+ children: [
+ TextSpan(text: 'Don’t 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().loginRegistration.visited_alhabib_group(true);
+ },
+ ),
+ ],
),
- ],
- ),
- ),
+ ),
+ ],
+ )
],
- )
- ],
- ),
+ ),
+ );
+ },
);
}
+ // Widget build(BuildContext context) {
+ // projectViewModel = Provider.of(context);
+ // projectViewModel.isArabic ? _selectedLanguage = 0 : 1;
+ // toDoProvider = Provider.of(context);
+ // 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) {
+ // _selectedLanguage = value!;
+ // if (projectViewModel.isArabic) {
+ // projectViewModel.changeLanguage('en');
+ // locator().hamburgerMenu.logMenuItemClick('change language to english');
+ // } else {
+ // projectViewModel.changeLanguage('ar');
+ // locator().hamburgerMenu.logMenuItemClick('change language to arabic');
+ // }
+ // },
+ // dropdownIndexValue: _selectedLanguage,
+ // body: Column(
+ // children: [
+ // 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,
+ // ),
+ // ],
+ // ),
+ // ],
+ // ),
+ // ),
+ // Spacer(),
+ // Expanded(
+ // child: Container(
+ // padding: EdgeInsets.only(top: 30, bottom: 0, right: 21, left: 21),
+ // child: Text(
+ // // TranslationBase.of(context).welcome,
+ // "Welcome to Dr. Sulaiman Al Habib Medical Group",
+ // style: TextStyle(fontSize: 36, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 47 / 36),
+ // ),
+ // ),
+ // ),
+ // Container(
+ // padding: EdgeInsets.only(top: 16, bottom: 10, right: 21, left: 21),
+ // child: Column(
+ // crossAxisAlignment: CrossAxisAlignment.stretch,
+ // children: [
+ // Directionality(
+ // textDirection: TextDirection.ltr,
+ // child: inputWidget(
+ // "National ID. or File No",
+ // "1xxxxxxxx",
+ // nationIdController,
+ // isEnable: true,
+ // prefix: null,
+ // hasSelection: false,
+ // isBorderAllowed: false,
+ // isAllowLeadingIcon: true,
+ // leadingIcon: "assets/images/svg/student-card.svg",
+ // ),
+ // ),
+ // ],
+ // ),
+ // ),
+ // SizedBox(
+ // height: 15,
+ // ),
+ // Row(
+ // mainAxisSize: MainAxisSize.min,
+ // children: [
+ // Expanded(
+ // child: Container(
+ // padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21),
+ // child: DefaultButton(
+ // TranslationBase.of(context).login,
+ // () {
+ // bool isValid = validateIqama(nationIdController.text);
+ // print("Iqama is valid: $isValid");
+ //
+ // if (isValid) {
+ // showModalBottomSheet(
+ // context: context,
+ // isScrollControlled: true,
+ // isDismissible: false,
+ // backgroundColor: Colors.transparent,
+ // builder: (context) => Padding(
+ // padding: EdgeInsets.only(
+ // bottom: MediaQuery.of(context).viewInsets.bottom,
+ // ),
+ // child: SingleChildScrollView(
+ // child: GenericBottomSheet(
+ // countryCode: "966", // Default is +966 as in your example
+ // initialPhoneNumber: "", //
+ // textController: phoneController,
+ // buttons: [
+ // Padding(
+ // padding: const EdgeInsets.only(bottom: 10),
+ // child: CustomButton(
+ // text: "Send me OTP on SMS",
+ // onPressed: () {
+ // onOtpBtnPressed(OTPType.sms);
+ // },
+ // backgroundColor: Colors.red,
+ // borderColor: Colors.red,
+ // textColor: Colors.white,
+ // icon: "assets/images/svg/message.svg",
+ // ),
+ // ),
+ // Row(
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // children: [
+ // Padding(
+ // padding: const EdgeInsets.symmetric(horizontal: 8),
+ // child: AppText(
+ // "OR",
+ // fontSize: 16,
+ // fontFamily: 'poppins',
+ // color: Color(0xFF2E3039),
+ // fontWeight: FontWeight.w500,
+ // ),
+ // ),
+ // ],
+ // ),
+ // Padding(
+ // padding: const EdgeInsets.only(bottom: 10),
+ // child: CustomButton(
+ // text: "Send me OTP on WhatsApp",
+ // onPressed: () {
+ // onOtpBtnPressed(OTPType.whatsapp);
+ // },
+ // backgroundColor: Colors.white,
+ // borderColor: Color(0xFF2E3039),
+ // textColor: Color(0xFF2E3039),
+ // icon: "assets/images/svg/whatsapp.svg",
+ // ),
+ // ),
+ // ],
+ // ),
+ // ),
+ // ));
+ // } else {
+ // Utils.showErrorToast("Please enter a valid Iqama number.");
+ // }
+ // },
+ // // color: CustomColors.,
+ // textColor: Colors.white,
+ // ),
+ // ),
+ // ),
+ // // SizedBox(width: 8),
+ // // Expanded(
+ // // child: DefaultButton(
+ // // TranslationBase.of(context).yes,
+ // // () => {
+ // // Navigator.of(context).push(FadePage(page: LoginType())),
+ // // locator().loginRegistration.visited_alhabib_group(true),
+ // // },
+ // // color: CustomColors.green,
+ // // ),
+ // // ),
+ // ],
+ // ),
+ // 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(text: 'Don’t 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()));
+ // // Example: Navigator.push(context, MaterialPageRoute(builder: (context) => RegisterScreen()));
+ // },
+ // ),
+ // ],
+ // ),
+ // ),
+ // ],
+ // )
+ // ],
+ // ),
+ // );
+ // }
+
void onOtpBtnPressed(OTPType type) {
if (phoneController.text.isEmpty) {
Utils.showErrorToast("Please enter your phone number.");
@@ -488,14 +739,14 @@ class _WelcomeLogin extends State {
userData = result.list,
sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
//Remove o+ from here Added by Aamir
- authenticatedUserObject.user = result.list,
- projectViewModel.setPrivilege(privilegeList: res),
+ authenticatedUserObject.user = result.list,
+ projectViewModel.setPrivilege(privilegeList: res),
await sharedPref.setObject(MAIN_USER, result.list),
await sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID,
await sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
await sharedPref.setString(TOKEN, result.authenticationTokenID),
- checkIfUserAgreedBefore(result),
+ checkIfUserAgreedBefore(result),
// projectViewModel.analytics.loginRegistration.login_successful(),
}
}
@@ -644,7 +895,7 @@ class _WelcomeLogin extends State {
isArabic: projectViewModel.isArabic,
),
),
- (r) => false);
+ (r) => false);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@@ -669,22 +920,20 @@ class _WelcomeLogin extends State {
getToDoCount();
checkIfIsInPatient();
- appointmentRateViewModel
- .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2)
- .then((_) {
+ appointmentRateViewModel.getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2).then((_) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
if (appointmentRateViewModel.isHaveAppointmentNotRate) {
Navigator.pushAndRemoveUntil(
context,
FadePage(page: RateAppointmentDoctor()),
- (route) => false,
+ (route) => false,
);
} else {
Navigator.pushAndRemoveUntil(
context,
FadePage(page: LandingPage()),
- (route) => false,
+ (route) => false,
);
}
insertIMEI();
@@ -695,9 +944,7 @@ class _WelcomeLogin extends State {
void getToDoCount() {
toDoProvider.setState(0, 0, true, "0");
- ClinicListService()
- .getActiveAppointmentNo(context)
- .then((res) {
+ ClinicListService().getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(
res['AppointmentActiveNumber'],
@@ -741,11 +988,4 @@ class _WelcomeLogin extends State {
}
});
}
-
- }
-
-
-
-
-
-
+}
diff --git a/lib/widgets/drawer/langauge_picker.dart b/lib/widgets/drawer/langauge_picker.dart
new file mode 100644
index 00000000..0d7bb380
--- /dev/null
+++ b/lib/widgets/drawer/langauge_picker.dart
@@ -0,0 +1,67 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+
+class LanguageSelector extends StatefulWidget {
+ final String currentLanguage;
+ final ValueChanged onLanguageChanged;
+ final List