diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 173a436b..fb9f1154 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; import 'package:provider/provider.dart'; @@ -19,7 +19,7 @@ import '../locator.dart'; import '../routes.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); -Helpers helpers = new Helpers(); +TabUtil helpers = new TabUtil(); class BaseAppClient { //TODO change the post fun to nun static when you change all service @@ -109,7 +109,7 @@ class BaseAppClient { print("Body : ${json.encode(body)}"); var asd = json.encode(body); var asd2; - if (await Helpers.checkConnection()) { + if (await TabUtil.checkConnection()) { final response = await http.post(Uri.parse(url), body: json.encode(body), headers: { @@ -118,7 +118,7 @@ class BaseAppClient { }); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { - onFailure(Helpers.generateContactAdminMsg(), statusCode); + onFailure(TabUtil.generateContactAdminMsg(), statusCode); } else { var parsed = json.decode(response.body.toString()); if (parsed['ErrorType'] == 4) { @@ -134,7 +134,7 @@ class BaseAppClient { listen: false) .logout(); - Helpers.showErrorToast('Your session expired Please login again'); + TabUtil.showErrorToast('Your session expired Please login again'); locator().pushNamedAndRemoveUntil(ROOT); } if (isAllowAny) { @@ -238,7 +238,7 @@ class BaseAppClient { print("Body : ${json.encode(body)}"); var asd = json.encode(body); var asd2; - if (await Helpers.checkConnection()) { + if (await TabUtil.checkConnection()) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final int statusCode = response.statusCode; @@ -335,7 +335,7 @@ class BaseAppClient { } } if (error == null || error == "null" || error == "null\n") { - return Helpers.generateContactAdminMsg(); + return TabUtil.generateContactAdminMsg(); } return error; } diff --git a/lib/core/model/patient/patiant_info_model.dart b/lib/core/model/patient/patiant_info_model.dart index 4363f168..7a1c22b6 100644 --- a/lib/core/model/patient/patiant_info_model.dart +++ b/lib/core/model/patient/patiant_info_model.dart @@ -1,7 +1,7 @@ // TODO = it have to be changed. import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; class PatiantInformtion { PatiantInformtion patientDetails; @@ -200,7 +200,7 @@ class PatiantInformtion { bedId = json["BedID"] ?? json["bedID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; description = json["Description"] ?? json["description"]; - clinicDescription = Helpers.convertToTitleCase( + clinicDescription = TabUtil.convertToTitleCase( json["ClinicDescription"] ?? json["clinicDescription"]??''); clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index ecbfb471..1047a331 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -22,7 +22,7 @@ import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/core/model/doctor/user_model.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/services.dart'; @@ -424,7 +424,7 @@ class AuthenticationViewModel extends BaseViewModel { logout({bool isFromLogin = false}) async { localToken = ""; String lang = await sharedPref.getString(APP_Language); - await Helpers.clearSharedPref(); + await TabUtil.clearSharedPref(); doctorProfile = null; sharedPref.setString(APP_Language, lang); deleteUser(); diff --git a/lib/core/viewModel/medicine_view_model.dart b/lib/core/viewModel/medicine_view_model.dart index 7f8f4263..5f4622a5 100644 --- a/lib/core/viewModel/medicine_view_model.dart +++ b/lib/core/viewModel/medicine_view_model.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_container.da import 'package:flutter/cupertino.dart'; import '../../locator.dart'; import '../../utils/dr_app_toast_msg.dart'; -import '../../utils/helpers.dart'; +import '../../utils/utils.dart'; import '../../widgets/shared/loader/gif_loader_dialog_utils.dart'; import '../model/Prescriptions/post_prescrition_req_model.dart'; import '../model/Prescriptions/prescription_model.dart'; diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 97c6b438..12d8ac1e 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -22,7 +22,7 @@ import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:flutter/cupertino.dart'; import '../../widgets/shared/loader/gif_loader_dialog_utils.dart'; @@ -415,22 +415,22 @@ class ProcedureViewModel extends BaseViewModel { await postProcedure(postProcedureReqModel, patient.patientMRN); if (state == ViewState.ErrorLocal) { - Helpers.showErrorToast(error); + TabUtil.showErrorToast(error); getProcedure(mrn: patient.patientMRN); } else if (state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('procedure has been added'); } } else { if (state == ViewState.ErrorLocal) { - Helpers.showErrorToast(error); + TabUtil.showErrorToast(error); getProcedure(mrn: patient.patientMRN); } else if (state == ViewState.Idle) { - Helpers.showErrorToast( + TabUtil.showErrorToast( valadteProcedureList[0].entityList[0].warringMessages); } } } else { - Helpers.showErrorToast(error); + TabUtil.showErrorToast(error); } } } diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index c4010313..29f91ba5 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -7,13 +7,13 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:provider/provider.dart'; import 'authentication_view_model.dart'; -Helpers helpers = Helpers(); +TabUtil helpers = TabUtil(); class ProjectViewModel with ChangeNotifier { DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 84c2c290..57f44422 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; @@ -163,7 +163,7 @@ class _LoginScreenState extends State { isTextFieldHasSuffix: true, enabled: false, onClick: () { - Helpers.showCupertinoPicker( + TabUtil.showCupertinoPicker( context, projectsList, 'facilityName', @@ -227,7 +227,7 @@ class _LoginScreenState extends State { await authenticationViewModel.login(authenticationViewModel.userInfo); if (authenticationViewModel.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); - Helpers.showErrorToast(authenticationViewModel.error); + TabUtil.showErrorToast(authenticationViewModel.error); } else { GifLoaderDialogUtils.hideDialog(context); authenticationViewModel.setUnverified(true, isFromLogin: true); diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 08c32d7c..0f91dbb1 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -20,11 +20,11 @@ import 'package:provider/provider.dart'; import '../../config/size_config.dart'; import '../../utils/dr_app_shared_pref.dart'; -import '../../utils/helpers.dart'; +import '../../utils/utils.dart'; import '../../widgets/auth/verification_methods_list.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); -Helpers helpers = Helpers(); +TabUtil helpers = TabUtil(); ///TODO Elham* check if this still in user or not class VerificationMethodsScreen extends StatefulWidget { @@ -101,7 +101,7 @@ class _VerificationMethodsScreenState extends State { letterSpacing: -0.72, ), AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( authenticationViewModel.user.doctorName), fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * @@ -499,7 +499,7 @@ class _VerificationMethodsScreenState extends State { authMethodType: authMethodType, password: authenticationViewModel.userInfo.password); if (authenticationViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(authenticationViewModel.error); + TabUtil.showErrorToast(authenticationViewModel.error); GifLoaderDialogUtils.hideDialog(context); } else { GifLoaderDialogUtils.hideDialog(context); @@ -508,7 +508,7 @@ class _VerificationMethodsScreenState extends State { } else { // TODO route to this page with parameters to inicate we should present 2 option if (Platform.isAndroid && authMethodType == AuthMethodTypes.Fingerprint) { - Helpers.showErrorToast('Your device not support this feature'); + TabUtil.showErrorToast('Your device not support this feature'); } else {} } } @@ -520,7 +520,7 @@ class _VerificationMethodsScreenState extends State { if (authenticationViewModel.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); - Helpers.showErrorToast(authenticationViewModel.error); + TabUtil.showErrorToast(authenticationViewModel.error); } else { await sharedPref.setString( TOKEN, @@ -620,7 +620,7 @@ class _VerificationMethodsScreenState extends State { activationCode: value, isSilentLogin: isSilentLogin); if (authenticationViewModel.state == ViewState.ErrorLocal) { Navigator.pop(context); - Helpers.showErrorToast(authenticationViewModel.error); + TabUtil.showErrorToast(authenticationViewModel.error); } else { await authenticationViewModel.onCheckActivationCodeSuccess(); if (value != null) { @@ -633,7 +633,7 @@ class _VerificationMethodsScreenState extends State { navigateToLandingPage() { if (authenticationViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(authenticationViewModel.error); + TabUtil.showErrorToast(authenticationViewModel.error); } else { authenticationViewModel.setAppStatus(APP_STATUS.AUTHENTICATED); } diff --git a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart index c9d968a9..4927ead8 100644 --- a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_questio import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -526,7 +526,7 @@ class _DoctorReplayChatState extends State { AppGlobal.appGreenColor, onSuffixTap: () async { if (msgController.text.isEmpty) { - Helpers.showErrorToast( + TabUtil.showErrorToast( "Please Add Doctor Reply"); return; } else { @@ -538,7 +538,7 @@ class _DoctorReplayChatState extends State { widget.reply); if (widget.previousModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast( + TabUtil.showErrorToast( widget.previousModel.error); } else { DrAppToastMsg.showSuccesToast( diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart index a6564fa7..d6066d90 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart @@ -1,11 +1,10 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/tab_util.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/utils/tab_helper.dart'; import 'all_doctor_questions.dart'; import 'not_replaied_Doctor_Questions.dart'; diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart index c3578639..337078e5 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; @@ -133,7 +133,7 @@ class _DoctorReplyWidgetState extends State { children: [ Expanded( child: AppText( - Helpers.capitalize(widget.reply.patientName), + TabUtil.capitalize(widget.reply.patientName), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, fontFamily: 'Poppins', diff --git a/lib/screens/home/dashboard_slider-item-widget.dart b/lib/screens/home/dashboard_slider-item-widget.dart index 0c10226d..99c7caec 100644 --- a/lib/screens/home/dashboard_slider-item-widget.dart +++ b/lib/screens/home/dashboard_slider-item-widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/widgets/dashboard/activity_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -23,8 +23,8 @@ class DashboardSliderItemWidget extends StatelessWidget { margin: EdgeInsets.symmetric( horizontal: SizeConfig.widthMultiplier * 1), child: Label( - firstLine: Helpers.getLabelFromKPI(item.kPIName), - secondLine: Helpers.getNameFromKPI(item.kPIName), + firstLine: TabUtil.getLabelFromKPI(item.kPIName), + secondLine: TabUtil.getNameFromKPI(item.kPIName), ), ), ], diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 2aa3028d..d3cc492e 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -20,7 +20,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_ref import 'package:doctor_app_flutter/screens/patients/register_patient/RegisterPatientPage.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -181,7 +181,7 @@ class _HomeScreenState extends State { ], ), AppText( - Helpers + TabUtil .convertToTitleCase( item.clinicName), fontSize: 14, @@ -214,7 +214,7 @@ class _HomeScreenState extends State { .map((item) { return DropdownMenuItem( child: AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( item.clinicName), fontSize: 14, letterSpacing: -0.96, diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 7c9a820f..e6d83abb 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/live_care/live-care_transfer_to_admin import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart'; import 'package:doctor_app_flutter/utils/VideoChannel.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; @@ -134,7 +134,7 @@ class _EndCallScreenState extends State { 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient, color: Colors.red[800], onTap: () { - Helpers.showConfirmationDialog(context, + TabUtil.showConfirmationDialog(context, "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).endLC} ${TranslationBase.of(context).consultation} ?", () async { Navigator.of(context).pop(); @@ -166,7 +166,7 @@ class _EndCallScreenState extends State { TranslationBase.of(context).instruction, "", 'assets/images/svgs/profile_screen/health summary.svg', onTap: () { - Helpers.showConfirmationDialog(context, + TabUtil.showConfirmationDialog(context, "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).sendLC} ${TranslationBase.of(context).instruction} ?", () async { Navigator.of(context).pop(); diff --git a/lib/screens/live_care/live-care_transfer_to_admin.dart b/lib/screens/live_care/live-care_transfer_to_admin.dart index 21083277..6bdca9ab 100644 --- a/lib/screens/live_care/live-care_transfer_to_admin.dart +++ b/lib/screens/live_care/live-care_transfer_to_admin.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/button_bottom_sheet.dart'; @@ -116,7 +116,7 @@ class _LivaCareTransferToAdminState extends State { noteError = null; } if (noteController.text.isNotEmpty) { - Helpers.showConfirmationDialog(context, + TabUtil.showConfirmationDialog(context, "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).transferTo}${TranslationBase.of(context).admin} ?", () async { Navigator.of(context).pop(); diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index eee67e88..844a30ac 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/livecare/get_pending_res_list.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -28,7 +28,7 @@ class LiveCarePandingListScreen extends StatefulWidget { class _LiveCarePandingListState extends State { List _data = []; - Helpers helpers = new Helpers(); + TabUtil helpers = new TabUtil(); bool _isInit = true; LiveCareViewModel _liveCareProvider; diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index 6458d3b2..c78db13e 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/VideoChannel.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -38,7 +38,7 @@ class _VideoCallPageState extends State { String image_url = 'https://hmgwebservices.com/Images/MobileImages/DUBAI/'; //bool _isOutOfStuck = false; - Helpers helpers = new Helpers(); + TabUtil helpers = new TabUtil(); var doctorprofile = {}; var notes; @@ -106,7 +106,7 @@ class _VideoCallPageState extends State { connectOpenTok(result); }).catchError((error) => - {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + {TabUtil.showErrorToast(error), Navigator.of(context).pop()}); } @override @@ -317,7 +317,7 @@ class _VideoCallPageState extends State { .then((result) { connectOpenTok(result); }).catchError((error) => - {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + {TabUtil.showErrorToast(error), Navigator.of(context).pop()}); } endCall() { @@ -327,7 +327,7 @@ class _VideoCallPageState extends State { .then((result) { print(result); }).catchError((error) => - {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + {TabUtil.showErrorToast(error), Navigator.of(context).pop()}); } endCallWithCharge() { @@ -338,7 +338,7 @@ class _VideoCallPageState extends State { print('end callwith charge'); print(result); }).catchError((error) => - {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + {TabUtil.showErrorToast(error), Navigator.of(context).pop()}); } closeRoute() { diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 45f187aa..6d955e78 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart' import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -38,7 +38,7 @@ class MedicineSearchScreen extends StatefulWidget with DrAppToastMsg { class _MedicineSearchState extends State { var data; final myController = TextEditingController(); - Helpers helpers = new Helpers(); + TabUtil helpers = new TabUtil(); bool _hasSpeech = false; String _currentLocaleId = ""; final SpeechToText speech = SpeechToText(); @@ -208,11 +208,11 @@ class _MedicineSearchState extends State { searchMedicine(context, MedicineViewModel model) async { FocusScope.of(context).unfocus(); if (myController.text.isNullOrEmpty()) { - Helpers.showErrorToast(TranslationBase.of(context).typeMedicineName); + TabUtil.showErrorToast(TranslationBase.of(context).typeMedicineName); return; } if (myController.text.length < 3) { - Helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); + TabUtil.showErrorToast(TranslationBase.of(context).moreThan3Letter); return; } diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index 131bf694..372b4af8 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -38,7 +38,7 @@ class PharmaciesListScreen extends StatefulWidget { } class _PharmaciesListState extends State { - Helpers helpers = new Helpers(); + TabUtil helpers = new TabUtil(); ProjectViewModel projectsProvider; @override @@ -121,7 +121,7 @@ class _PharmaciesListState extends State { Expanded( flex: 4, child: AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( model.pharmaciesList[index] ["LocationDescription"] ?? ''), diff --git a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart index 8e570750..4f79a047 100644 --- a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -23,7 +23,7 @@ import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; -Helpers helpers = Helpers(); +TabUtil helpers = TabUtil(); class AddPatientSickLeaveScreen extends StatefulWidget { final appointmentNo; @@ -108,7 +108,7 @@ class _AddPatientSickLeaveScreenState extends State { height: 30, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), hintText: TranslationBase.of(context).sickLeave + ' ' + TranslationBase.of(context).days, @@ -138,9 +138,9 @@ class _AddPatientSickLeaveScreenState extends State { height: 10, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), onClick: () { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); _presentDatePicker(); }, hintText: @@ -170,7 +170,7 @@ class _AddPatientSickLeaveScreenState extends State { height: 5, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), hintText: TranslationBase.of(context).clinic, enabled: false, maxLines: 1, @@ -223,7 +223,7 @@ class _AddPatientSickLeaveScreenState extends State { height: 10, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), hintText: TranslationBase.of(context).doctor, enabled: false, maxLines: 1, @@ -241,7 +241,7 @@ class _AddPatientSickLeaveScreenState extends State { height: 10, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), hintText: TranslationBase.of(context).remarks, maxLines: 30, minLines: 5, @@ -319,7 +319,7 @@ class _AddPatientSickLeaveScreenState extends State { addSickLeave.appointmentNo = widget.patient.appointmentNo.toString(); await model.addSickLeave(addSickLeave); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } else { await widget.previousModel .getSickLeaveForPatient(widget.patient, isLocalBusy: true); diff --git a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart index 1802daea..bd996940 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patient-sick-leave/add_patient_sick_leave_screen.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; @@ -131,7 +131,7 @@ class PatientSickLeaveScreen extends StatelessWidget { Expanded( // width: MediaQuery.of(context).size.width*0.51, child: AppText( - Helpers.capitalize( + TabUtil.capitalize( item.doctorName ?? ""), fontSize: 18, color: Color(0xff2e303a), diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index fb893f48..f2ba1e54 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/DischargedPatientViewModel.dar import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -110,12 +110,12 @@ class _DischargedPatientState extends State { Container( width: 170, child: AppText( - (Helpers.capitalize(model + (TabUtil.capitalize(model .filterData[ index] .firstName) + " " + - Helpers.capitalize(model + TabUtil.capitalize(model .filterData[ index] .lastName)), diff --git a/lib/screens/patients/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index 32db6bf1..5cb5ce72 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -7,14 +7,13 @@ import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_car import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; +import 'package:doctor_app_flutter/utils/tab_util.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - -import '../../../utils/tab_helper.dart'; import '../DischargedPatientPage.dart'; import 'in_patient_list_page.dart'; @@ -51,7 +50,7 @@ class _InPatientScreenState extends State } _handleTabSelection() { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); setState(() { widget.showBottomSheet = false; _activeTab = _tabController.index; diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index 56ac5753..05d12093 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -50,7 +50,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - (Helpers.capitalize( + (TabUtil.capitalize( "${referredPatient.firstName} ${referredPatient.lastName}")), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, diff --git a/lib/screens/patients/out_patient/filter_date_page.dart b/lib/screens/patients/out_patient/filter_date_page.dart index 7e4c3c7b..7869b254 100644 --- a/lib/screens/patients/out_patient/filter_date_page.dart +++ b/lib/screens/patients/out_patient/filter_date_page.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestM import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; @@ -152,7 +152,7 @@ class _FilterDatePageState extends State { null || widget.patientSearchViewModel.selectedToDate == null) { - Helpers.showErrorToast( + TabUtil.showErrorToast( "Please Select All The date Fields "); } else { Duration difference = widget @@ -160,7 +160,7 @@ class _FilterDatePageState extends State { .difference(widget .patientSearchViewModel.selectedFromDate); if (difference.inDays > 90) { - Helpers.showErrorToast( + TabUtil.showErrorToast( "The difference between from date and end date must be less than 3 months"); } else { String dateTo = AppDateUtils.convertDateToFormat( @@ -181,7 +181,7 @@ class _FilterDatePageState extends State { GifLoaderDialogUtils.hideDialog(context); if (widget.patientSearchViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast( + TabUtil.showErrorToast( widget.patientSearchViewModel.error); } else { Navigator.of(context).pop(); @@ -203,7 +203,7 @@ class _FilterDatePageState extends State { selectDate(BuildContext context, {bool isFromDate = true, DateTime firstDate, lastDate}) async { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); DateTime selectedDate = isFromDate ? this.widget.patientSearchViewModel.selectedFromDate ?? firstDate : this.widget.patientSearchViewModel.selectedToDate ?? lastDate; diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index 38e30961..b074453f 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/core/model/patient/patient_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/tab_util.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -20,8 +20,6 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_cus import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; - -import '../../../utils/tab_helper.dart'; import 'filter_date_page.dart'; // ignore: must_be_immutable diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 06d6a08d..597d86c2 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -11,7 +11,7 @@ import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -118,7 +118,7 @@ class _UcafDetailScreenState extends State { ]; return Container( height: screenSize.height * 0.070, - decoration: Helpers.containerBorderDecoration( + decoration: TabUtil.containerBorderDecoration( Color(0Xffffffff), Color(0xFFCCCCCC)), child: Row( mainAxisSize: MainAxisSize.max, @@ -130,7 +130,7 @@ class _UcafDetailScreenState extends State { child: Center( child: Container( height: screenSize.height * 0.070, - decoration: Helpers.containerBorderDecoration( + decoration: TabUtil.containerBorderDecoration( _isActive ? HexColor("#B8382B") : Colors.white, _isActive ? HexColor("#B8382B") : Colors.white), child: Center( diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index 8ac73a98..07fa2a51 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -256,7 +256,7 @@ class _UCAFInputScreenState extends State { AppTextFieldCustom( hintText: TranslationBase.of(context).instruction, - dropDownText: Helpers.parseHtmlString(model + dropDownText: TabUtil.parseHtmlString(model .patientChiefComplaintList[0] .chiefComplaint), controller: _additionalComplaintsController, diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart index 70f7307b..468db0e8 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; @@ -230,7 +230,7 @@ class _DiabeticChartState extends State { await model.getDiabeticChartValues(patient, selectedDiabeticType.value, isLocalBusy: true); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } generateData(model); GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart index e307c57c..5aae5797 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryResModel.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; @@ -140,7 +140,7 @@ class _DischargeSummaryWidgetState extends State { //TranslationBase.of(context).doctorResponse + " : ", )), new TextSpan( - text: Helpers.parseHtmlString( + text: TabUtil.parseHtmlString( widget.dischargeSummary.pastHistory), style: TextStyle( fontFamily: 'Poppins', @@ -179,7 +179,7 @@ class _DischargeSummaryWidgetState extends State { //TranslationBase.of(context).doctorResponse + " : ", )), new TextSpan( - text: Helpers.parseHtmlString( + text: TabUtil.parseHtmlString( widget.dischargeSummary.investigations ?? ""), style: TextStyle( @@ -219,7 +219,7 @@ class _DischargeSummaryWidgetState extends State { //TranslationBase.of(context).doctorResponse + " : ", )), new TextSpan( - text: Helpers.parseHtmlString(widget + text: TabUtil.parseHtmlString(widget .dischargeSummary.conditionOnDischarge), style: TextStyle( fontFamily: 'Poppins', @@ -258,7 +258,7 @@ class _DischargeSummaryWidgetState extends State { //TranslationBase.of(context).doctorResponse + " : ", )), new TextSpan( - text: Helpers.parseHtmlString( + text: TabUtil.parseHtmlString( widget.dischargeSummary.planedProcedure), style: TextStyle( fontFamily: 'Poppins', diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index 342743c4..57653f71 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; @@ -156,7 +156,7 @@ class _AllLabSpecialResultState extends State { ), ), doctorName: - Helpers.convertToTitleCase(model.allSpecialLabList[index].doctorName), + TabUtil.convertToTitleCase(model.allSpecialLabList[index].doctorName), invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}', profileUrl: model @@ -164,7 +164,7 @@ class _AllLabSpecialResultState extends State { branch: model.allSpecialLabList[index].projectName, clinic: - Helpers.convertToTitleCase(model.allSpecialLabList[index].clinicDescription), + TabUtil.convertToTitleCase(model.allSpecialLabList[index].clinicDescription), appointmentDate: AppDateUtils.getDateTimeFromServerFormat( model.allSpecialLabList[index].createdOn, diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart index 0b0c5650..d5bde2e8 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/LabResultWidget.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; @@ -228,7 +228,7 @@ class _LaboratoryResultWidgetState extends State { duration: Duration(milliseconds: 7000), child: Container( width: double.infinity, - child: !Helpers.isTextHtml(widget.details) + child: !TabUtil.isTextHtml(widget.details) ? AppText( widget.details ?? TranslationBase.of(context) diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 2f0280b4..064a2bb2 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; @@ -186,7 +186,7 @@ class _LabsHomePageState extends State { ), ), doctorName: - Helpers.convertToTitleCase(model.patientLabOrdersList[index].doctorName), + TabUtil.convertToTitleCase(model.patientLabOrdersList[index].doctorName), invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}', profileUrl: model @@ -194,7 +194,7 @@ class _LabsHomePageState extends State { branch: model.patientLabOrdersList[index].projectName, clinic: - Helpers.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription), + TabUtil.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription), appointmentDate: model.patientLabOrdersList[index].createdOn, orderNo: model.patientLabOrdersList[index].orderNo, diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index ee706959..777562d8 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; diff --git a/lib/screens/patients/profile/notes/note/update_note.dart b/lib/screens/patients/profile/notes/note/update_note.dart index 6fa8997e..a3a138fd 100644 --- a/lib/screens/patients/profile/notes/note/update_note.dart +++ b/lib/screens/patients/profile/notes/note/update_note.dart @@ -14,7 +14,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; @@ -132,7 +132,7 @@ class _UpdateNoteOrderState extends State { child: InkWell( onTap: model.stpMasterList != null ? () { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); ListSelectDialog dialog = ListSelectDialog( list: model.stpMasterList, attributeName: 'Description', @@ -313,7 +313,7 @@ class _UpdateNoteOrderState extends State { if (widget.patientModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.patientModel.error); + TabUtil.showErrorToast(widget.patientModel.error); } else { ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( @@ -332,7 +332,7 @@ class _UpdateNoteOrderState extends State { TranslationBase.of(context).yourOrderAddedSuccessfully); Navigator.of(context).pop(); } else { - Helpers.showErrorToast(TranslationBase.of(context).youCannotAddOnlySpaces); + TabUtil.showErrorToast(TranslationBase.of(context).youCannotAddOnlySpaces); } })), ], diff --git a/lib/screens/patients/profile/operation_report/update_operation_report.dart b/lib/screens/patients/profile/operation_report/update_operation_report.dart index 75291322..4b787e3a 100644 --- a/lib/screens/patients/profile/operation_report/update_operation_report.dart +++ b/lib/screens/patients/profile/operation_report/update_operation_report.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; @@ -596,7 +596,7 @@ class _UpdateOperationReportState extends State { createUpdateOperationReportRequestModel); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } else { // await model.( // operationReportsRequest.toJson()); diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index 1b4c33c4..d4931f29 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -181,7 +181,7 @@ class _InterventionMedicationHistoryScreenState extends State callTimer.cancel(); }) ..onData((data) { - var t = Helpers.timeFrom(duration: data.elapsed); + var t = TabUtil.timeFrom(duration: data.elapsed); videoCallDurationStreamController.sink.add(t); }); } @@ -381,7 +381,7 @@ class _PatientProfileScreenState extends State if (model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } else { await model.getDoctorProfile(); patient.appointmentNo = int.parse(model @@ -452,7 +452,7 @@ class _PatientProfileScreenState extends State GifLoaderDialogUtils.hideDialog(context); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } else { patient.episodeNo = model.episodeID; Navigator.of(context) diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 1f33bcd8..dd5e7d0e 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_details_page.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; @@ -163,7 +163,7 @@ class _RadiologyHomePageState extends State { child: DoctorCard( isNoMargin: true, doctorName: - Helpers.convertToTitleCase(model.radiologyList[index].doctorName), + TabUtil.convertToTitleCase(model.radiologyList[index].doctorName), profileUrl: model.radiologyList[index].doctorImageURL, invoiceNO: @@ -171,7 +171,7 @@ class _RadiologyHomePageState extends State { branch: '${model.radiologyList[index].projectName}', clinic: - Helpers.convertToTitleCase(model.radiologyList[index].clinicDescription), + TabUtil.convertToTitleCase(model.radiologyList[index].clinicDescription), appointmentDate: model.radiologyList[index].orderDate ?? model.radiologyList[index].reportDate, diff --git a/lib/screens/patients/profile/referral/add_replay_on_referral_patient.dart b/lib/screens/patients/profile/referral/add_replay_on_referral_patient.dart index 749f95b9..a20262d1 100644 --- a/lib/screens/patients/profile/referral/add_replay_on_referral_patient.dart +++ b/lib/screens/patients/profile/referral/add_replay_on_referral_patient.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; @@ -156,7 +156,7 @@ class _AddReplayOnReferralPatientState reject); if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast( + TabUtil.showErrorToast( widget.patientReferralViewModel.error); } else { GifLoaderDialogUtils.hideDialog(context); @@ -166,7 +166,7 @@ class _AddReplayOnReferralPatientState Navigator.of(context).pop(); } } else { - Helpers.showErrorToast( + TabUtil.showErrorToast( "You can't add empty reply"); setState(() { isSubmitted = false; @@ -196,7 +196,7 @@ class _AddReplayOnReferralPatientState replay); if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast( + TabUtil.showErrorToast( widget.patientReferralViewModel.error); } else { GifLoaderDialogUtils.hideDialog(context); @@ -206,7 +206,7 @@ class _AddReplayOnReferralPatientState Navigator.of(context).pop(); } } else { - Helpers.showErrorToast( + TabUtil.showErrorToast( "You can't add empty reply"); setState(() { isSubmitted = false; diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 873c60e0..c6406f69 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -55,7 +55,7 @@ class MyReferralDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - (Helpers.capitalize(referralPatient.firstName + + (TabUtil.capitalize(referralPatient.firstName + " " + referralPatient.lastName)), fontSize: SizeConfig.textMultiplier * 2.5, diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index d6f4e2fd..7eb1646b 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -1,16 +1,13 @@ import 'dart:ui'; - import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/tab_util.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - -import '../../../../utils/tab_helper.dart'; import '../../ReferralDischargedPatientPage.dart'; import 'my-referral-inpatient-screen.dart'; diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 24548125..d92b4aa6 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart index 3789d8a3..c0479418 100644 --- a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/add_replay_on_referral_patient.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -55,7 +55,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - (Helpers.capitalize( + (TabUtil.capitalize( "${referredPatient.firstName} ${referredPatient.lastName}")), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart index 9ae6a3a4..7302ec33 100644 --- a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -52,7 +52,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - (Helpers.capitalize( + (TabUtil.capitalize( "${referredPatient.firstName} ${referredPatient.lastName}")), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index 7caa7cc7..615a9e79 100644 --- a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -143,7 +143,7 @@ class _AddAssessmentDetailsState extends State { margin: EdgeInsets.only(left: 0, right: 0, top: 15), child: AppTextFieldCustom( // height: 55.0, - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), hintText: TranslationBase.of(context).appointmentNumber, @@ -216,7 +216,7 @@ class _AddAssessmentDetailsState extends State { ), ) : AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), onClick: model.listOfICD10 != null ? () { setState(() { @@ -265,7 +265,7 @@ class _AddAssessmentDetailsState extends State { height: 7, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), onClick: model.listOfDiagnosisCondition != null ? () { MasterKeyDailog dialog = MasterKeyDailog( @@ -320,7 +320,7 @@ class _AddAssessmentDetailsState extends State { height: 10, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), onClick: model.listOfDiagnosisType != null ? () { MasterKeyDailog dialog = MasterKeyDailog( @@ -465,7 +465,7 @@ class _AddAssessmentDetailsState extends State { } GifLoaderDialogUtils.hideDialog(context); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } else { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart index 46ae2598..72d04da5 100644 --- a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart +++ b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -517,7 +517,7 @@ class _UpdateAssessmentPageState extends State @override nextFunction(model) { if (mySelectedAssessmentList.isEmpty) { - Helpers.showErrorToast(TranslationBase.of(context).assessmentErrorMsg); + TabUtil.showErrorToast(TranslationBase.of(context).assessmentErrorMsg); } else { widget.changeLoadingState(true); widget.changePageViewIndex(3); diff --git a/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart index b63c3914..aea66250 100644 --- a/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart +++ b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; @@ -44,7 +44,7 @@ class _ExaminationsListSearchWidgetState return Column( children: [ AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), hintText: TranslationBase.of(context).searchExamination, isTextFieldHasSuffix: true, hasBorder: false, diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 9c2081a4..7f5ca67d 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -11,7 +11,7 @@ import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -274,7 +274,7 @@ class _UpdateObjectivePageState extends State if (model.state == ViewState.ErrorLocal) { widget.changeLoadingState(false); - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); if (widget.patientInfo.admissionNo != null && widget.patientInfo.admissionNo.isNotEmpty) { // Navigator.of(context).pop(); @@ -293,7 +293,7 @@ class _UpdateObjectivePageState extends State } } } else { - Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg); + TabUtil.showErrorToast(TranslationBase.of(context).examinationErrorMsg); } } diff --git a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart index eec1119e..b34c0ee5 100644 --- a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -11,7 +11,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/plan/plan_call_back.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -91,7 +91,7 @@ class _UpdatePlanPageState extends State ///TODO set progressNote in model; if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) { - progressNoteController.text = Helpers.parseHtmlString( + progressNoteController.text = TabUtil.parseHtmlString( widget.sOAPViewModel.patientProgressNoteList[0].planNote); patientProgressNote.planNote = progressNoteController.text; @@ -130,7 +130,7 @@ class _UpdatePlanPageState extends State .getPatientProgressNote(getGetProgressNoteReqModel); if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) { - progressNoteController.text = Helpers.parseHtmlString( + progressNoteController.text = TabUtil.parseHtmlString( widget.sOAPViewModel.patientProgressNoteList[0].planNote); patientProgressNote.planNote = progressNoteController.text; patientProgressNote.createdByName = @@ -376,7 +376,7 @@ class _UpdatePlanPageState extends State } if (widget.sOAPViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.sOAPViewModel.error); + TabUtil.showErrorToast(widget.sOAPViewModel.error); } else { GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel( @@ -389,7 +389,7 @@ class _UpdatePlanPageState extends State await widget.sOAPViewModel .getPatientProgressNote(getGetProgressNoteReqModel); if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) { - progressNoteController.text = Helpers.parseHtmlString( + progressNoteController.text = TabUtil.parseHtmlString( widget.sOAPViewModel.patientProgressNoteList[0].planNote); patientProgressNote.planNote = progressNoteController.text; patientProgressNote.createdByName = @@ -411,7 +411,7 @@ class _UpdatePlanPageState extends State } widget.changeLoadingState(false); } else { - Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); + TabUtil.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); } } @@ -424,7 +424,7 @@ class _UpdatePlanPageState extends State Navigator.of(context).pop(); } } else { - Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); + TabUtil.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); } } } diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart index 8889715d..79572151 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -162,7 +162,7 @@ class _AddAllergiesState extends State { addAllergyLocally(MySelectedAllergy mySelectedAllergy) { if (mySelectedAllergy.selectedAllergy == null) { - Helpers.showErrorToast(TranslationBase.of(context).requiredMsg); + TabUtil.showErrorToast(TranslationBase.of(context).requiredMsg); } else { setState(() { List allergy = diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart index 2a640e40..cc5fb2ef 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; @@ -147,7 +147,7 @@ class _AddAllergiesItemState extends State { enabled: false, maxLines: 1, minLines: 1, - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), validationError: mySelectedAllergy != null && mySelectedAllergy.selectedAllergySeverity == null && mySelectedAllergy.hasValidationError diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart index 5a3f6a65..5fa289c8 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; @@ -58,7 +58,7 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState children: [ Expanded( child: Container( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), child: Center( child: Container( decoration: BoxDecoration( diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart index 6f549b79..287a91ac 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; @@ -201,7 +201,7 @@ class _UpdateAllergiesWidgetState extends State { changeParentState(); Navigator.of(context).pop(); } else { - Helpers.showErrorToast( + TabUtil.showErrorToast( TranslationBase.of(context).requiredMsg); } }); diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index 0fa2d15d..5737fac6 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -144,7 +144,7 @@ class _AddMedicationState extends State { ) : AppTextFieldCustom( height: - Helpers.getTextFieldHeight(), + TabUtil.getTextFieldHeight(), hintText: _selectedMedication != null ? _selectedMedication @@ -190,7 +190,7 @@ class _AddMedicationState extends State { height: 5, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), enabled: false, onClick: model.medicationDoseTimeList != null @@ -244,7 +244,7 @@ class _AddMedicationState extends State { height: 5, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), enabled: false, isTextFieldHasSuffix: true, onClick: model.medicationStrengthList != @@ -301,7 +301,7 @@ class _AddMedicationState extends State { height: 5, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), enabled: false, isTextFieldHasSuffix: true, onClick: model.medicationRouteList != null @@ -355,7 +355,7 @@ class _AddMedicationState extends State { height: 5, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), onClick: model.medicationFrequencyList != null ? () { diff --git a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index 704cd568..16fdfc6f 100644 --- a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjective_call_back.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -168,7 +168,7 @@ class _UpdateSubjectivePageState extends State if (model.patientChiefComplaintList.isNotEmpty) { isChiefExpand = true; - complaintsController.text = Helpers.parseHtmlString( + complaintsController.text = TabUtil.parseHtmlString( model.patientChiefComplaintList[0].chiefComplaint); illnessController.text = model.patientChiefComplaintList[0].hopi; medicationController.text = @@ -329,7 +329,7 @@ class _UpdateSubjectivePageState extends State }); widget.changeLoadingState(false); - Helpers.showErrorToast( + TabUtil.showErrorToast( TranslationBase.of(context).chiefComplaintErrorMsg); } } diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index 509f6b1b..cfeae635 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -267,7 +267,7 @@ class _RegisterConfirmationPatientPageState ), ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), enabled: false, onClick: () { openMaritalStatusList(context); @@ -289,7 +289,7 @@ class _RegisterConfirmationPatientPageState height: 20, ), AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), enabled: false, onClick: () { openLangList(context); @@ -452,7 +452,7 @@ class _RegisterConfirmationPatientPageState await widget.model .registrationPatient(patientRegistrationModel); if (widget.model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.model.error); + TabUtil.showErrorToast(widget.model.error); } else { DrAppToastMsg.showSuccesToast( "Patient added Successfully"); diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 60613836..63751d24 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientFo import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -381,12 +381,12 @@ class _RegisterSearchPatientPageState extends State { "31/07/1988", //"${AppDateUtils.convertStringToDateFormat(_birthDate.toString(), "dd/MM/yyyy")}" ); if (widget.model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.model.error); + TabUtil.showErrorToast(widget.model.error); } else { await widget.model .getPatientInfo(getPatientInfoRequestModel); if (widget.model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.model.error); + TabUtil.showErrorToast(widget.model.error); } else { widget.changePageViewIndex(1); } diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart index 98a44239..4e9057c7 100644 --- a/lib/screens/patients/register_patient/VerifyMethodPage.dart +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -461,7 +461,7 @@ class _ActivationPageState extends State { await widget.model.checkActivationCode( "${digit1.text}${digit2.text}${digit3.text}${digit4.text}"); if (widget.model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.model.error); + TabUtil.showErrorToast(widget.model.error); //TODO Elham* remove this widget.changePageViewIndex(2); GifLoaderDialogUtils.hideDialog(context); @@ -484,7 +484,7 @@ class _ActivationPageState extends State { await widget.model.sendActivationCodeByOTPNotificationType(otpType: type); if (widget.model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.model.error); + TabUtil.showErrorToast(widget.model.error); GifLoaderDialogUtils.hideDialog(context); // TODO Elham* retuen the else setState(() { diff --git a/lib/screens/patients/utils/tab_util.dart b/lib/screens/patients/utils/tab_util.dart new file mode 100644 index 00000000..b9f78bb0 --- /dev/null +++ b/lib/screens/patients/utils/tab_util.dart @@ -0,0 +1 @@ +// TODO Implement this library. \ No newline at end of file diff --git a/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart b/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart index 23db9a8c..6d470527 100644 --- a/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart +++ b/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; @@ -127,7 +127,7 @@ class _AddDrugWidgetState extends State { ); if (widget.medicineModel.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); - Helpers.showErrorToast(widget.medicineModel.error); + TabUtil.showErrorToast(widget.medicineModel.error); } else if (widget.modelPrescription.state == ViewState.Idle) { await widget.modelPrescription.getPrescriptionListNew( appNo: widget.patient.appointmentNo, diff --git a/lib/screens/prescription/add_prescription/prescription_form_widget.dart b/lib/screens/prescription/add_prescription/prescription_form_widget.dart index 754a9351..9472c3cc 100644 --- a/lib/screens/prescription/add_prescription/prescription_form_widget.dart +++ b/lib/screens/prescription/add_prescription/prescription_form_widget.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_text_filed.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -438,7 +438,7 @@ class _PrescriptionFormWidgetState extends State { } selectDate(BuildContext context, PrescriptionViewModel model) async { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); DateTime selectedDate; selectedDate = DateTime.now(); final DateTime picked = await showDatePicker( diff --git a/lib/screens/prescription/add_prescription/search_preescription_widget.dart b/lib/screens/prescription/add_prescription/search_preescription_widget.dart index 5ebef63d..2fea5cc9 100644 --- a/lib/screens/prescription/add_prescription/search_preescription_widget.dart +++ b/lib/screens/prescription/add_prescription/search_preescription_widget.dart @@ -5,7 +5,7 @@ import '../../../config/config.dart'; import '../../../core/model/search_drug/get_medication_response_model.dart'; import '../../../core/viewModel/medicine_view_model.dart'; import '../../../core/viewModel/prescription/prescription_view_model.dart'; -import '../../../utils/helpers.dart'; +import '../../../utils/utils.dart'; import '../../../utils/translations_delegate_base.dart'; import '../../../widgets/medicine/medicine_item_widget.dart'; import '../../../widgets/shared/buttons/app_buttons_widget.dart'; @@ -127,7 +127,7 @@ class SearchPrescriptionWidget extends StatelessWidget { searchMedicine(context, MedicineViewModel model) async { FocusScope.of(context).unfocus(); if (myController.text.length < 3) { - Helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); + TabUtil.showErrorToast(TranslationBase.of(context).moreThan3Letter); return; } GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/screens/prescription/new_prescriptions_page.dart b/lib/screens/prescription/new_prescriptions_page.dart index f93baf0a..7d303beb 100644 --- a/lib/screens/prescription/new_prescriptions_page.dart +++ b/lib/screens/prescription/new_prescriptions_page.dart @@ -21,7 +21,7 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../../utils/helpers.dart'; +import '../../utils/utils.dart'; import '../../widgets/shared/errors/error_message.dart'; class NewPrescriptionsPage extends StatelessWidget { @@ -99,7 +99,7 @@ class NewPrescriptionsPage extends StatelessWidget { children: [ CustomRow( label: "", - value: Helpers.convertToTitleCase(model + value: TabUtil.convertToTitleCase(model .prescriptionListNew[index] .medicationName), valueSize: SizeConfig diff --git a/lib/screens/prescription/old_prescriptions_page.dart b/lib/screens/prescription/old_prescriptions_page.dart index 5b8636fb..1c7a6d64 100644 --- a/lib/screens/prescription/old_prescriptions_page.dart +++ b/lib/screens/prescription/old_prescriptions_page.dart @@ -21,7 +21,7 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../../utils/helpers.dart'; +import '../../utils/utils.dart'; import '../../widgets/shared/errors/error_message.dart'; class OldPrescriptionsPage extends StatelessWidget { @@ -93,7 +93,7 @@ class OldPrescriptionsPage extends StatelessWidget { children: [ DoctorCard( doctorName: - Helpers.convertToTitleCase(model + TabUtil.convertToTitleCase(model .prescriptionsList[index] .doctorName), profileUrl: model @@ -159,7 +159,7 @@ class OldPrescriptionsPage extends StatelessWidget { children: [ CustomRow( label: "", - value: Helpers.convertToTitleCase(model + value: TabUtil.convertToTitleCase(model .medicationForInPatient[index] .pHRItemDescription), valueSize: SizeConfig @@ -171,27 +171,27 @@ class OldPrescriptionsPage extends StatelessWidget { ), CustomRow( label: "Doctor Name :", - value: Helpers.convertToTitleCase(model + value: TabUtil.convertToTitleCase(model .medicationForInPatient[index] .doctorName .toString()), ), CustomRow( label: "Status :", - value: Helpers.convertToTitleCase(model + value: TabUtil.convertToTitleCase(model .medicationForInPatient[index] .statusDescription .toString()), ), CustomRow( label: "dose :", - value: Helpers.convertToTitleCase(model + value: TabUtil.convertToTitleCase(model .medicationForInPatient[index] .dose .toString()), ), CustomRow( label: "comments :", - value: Helpers.convertToTitleCase(model + value: TabUtil.convertToTitleCase(model .medicationForInPatient[index] .comments .toString()), diff --git a/lib/screens/prescription/prescription_checkout_screen.dart b/lib/screens/prescription/prescription_checkout_screen.dart index 5d68db12..c7fea76b 100644 --- a/lib/screens/prescription/prescription_checkout_screen.dart +++ b/lib/screens/prescription/prescription_checkout_screen.dart @@ -16,7 +16,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_text_filed.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -94,7 +94,7 @@ class _PrescriptionCheckOutScreenState await model.postPrescription(postProcedureReqModel, patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); } else if (model.state == ViewState.Idle) { model.getPrescriptions(patient); DrAppToastMsg.showSuccesToast(TranslationBase.of(context).medicationHasBeenAdded); @@ -830,7 +830,7 @@ class _PrescriptionCheckOutScreenState } selectDate(BuildContext context, PrescriptionViewModel model) async { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); DateTime selectedDate; selectedDate = DateTime.now(); final DateTime picked = await showDatePicker( diff --git a/lib/screens/prescription/prescription_text_filed.dart b/lib/screens/prescription/prescription_text_filed.dart index 986c48a9..002a35f5 100644 --- a/lib/screens/prescription/prescription_text_filed.dart +++ b/lib/screens/prescription/prescription_text_filed.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; @@ -39,7 +39,7 @@ class _PrescriptionTextFiledState extends State { child: InkWell( onTap: widget.elementList != null ? () { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); ListSelectDialog dialog = ListSelectDialog( list: widget.elementList, attributeName: '${widget.keyName}', diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index c5780e7c..3eb6b24e 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; @@ -94,7 +94,7 @@ class ProcedureCard extends StatelessWidget { height: 5, ), AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( entityList.procedureName), bold: true, fontSize: 14, @@ -175,7 +175,7 @@ class ProcedureCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( entityList.doctorName), fontFamily: 'Poppins', fontWeight: FontWeight.w800, @@ -184,7 +184,7 @@ class ProcedureCard extends StatelessWidget { ), if (entityList.clinicDescription != null) AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( entityList.clinicDescription), fontFamily: 'Poppins', fontWeight: FontWeight.w700, @@ -204,7 +204,7 @@ class ProcedureCard extends StatelessWidget { children: [ Expanded( child: AppText( - entityList.remarks!= null?Helpers.convertToTitleCase( + entityList.remarks!= null?TabUtil.convertToTitleCase( entityList.remarks.toString()) : '', fontSize: 12, diff --git a/lib/screens/procedures/base_add_procedure_tab_page.dart b/lib/screens/procedures/base_add_procedure_tab_page.dart index 40aed582..e434066e 100644 --- a/lib/screens/procedures/base_add_procedure_tab_page.dart +++ b/lib/screens/procedures/base_add_procedure_tab_page.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../core/viewModel/project_view_model.dart'; -import '../../utils/tab_helper.dart'; +import '../../utils/tab_util.dart'; import 'ProcedureType.dart'; import 'add-favourite-procedure.dart'; import 'add-procedure-page.dart'; diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 55077531..3bf7d9a6 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index 5a180667..08382cf8 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -410,7 +410,7 @@ class _UpdateProcedureWidgetState extends State { mrn: patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); + TabUtil.showErrorToast(model.error); model.getProcedure(mrn: patient.patientMRN); } else if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('procedure has been updated'); diff --git a/lib/screens/qr_reader/QR_reader_screen.dart b/lib/screens/qr_reader/QR_reader_screen.dart index 827b2752..1e64e415 100644 --- a/lib/screens/qr_reader/QR_reader_screen.dart +++ b/lib/screens/qr_reader/QR_reader_screen.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -17,7 +17,7 @@ import 'package:flutter/material.dart'; import '../../routes.dart'; import '../base/base_view.dart'; -Helpers helpers = Helpers(); +TabUtil helpers = TabUtil(); class QrReaderScreen extends StatefulWidget { @override @@ -111,7 +111,7 @@ class _QrReaderScreenState extends State { DrAppToastMsg.showErrorToast(model.error); } }).catchError((error) { - Helpers.showErrorToast(error.message); + TabUtil.showErrorToast(error.message); }); } } diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index 72cc63a6..47620d00 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -23,7 +23,7 @@ import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; -Helpers helpers = Helpers(); +TabUtil helpers = TabUtil(); class RescheduleLeaveScreen extends StatefulWidget { final isUpdate; diff --git a/lib/utils/tab_helper.dart b/lib/utils/tab_util.dart similarity index 100% rename from lib/utils/tab_helper.dart rename to lib/utils/tab_util.dart diff --git a/lib/utils/helpers.dart b/lib/utils/utils.dart similarity index 99% rename from lib/utils/helpers.dart rename to lib/utils/utils.dart index dbcd9910..986569d6 100644 --- a/lib/utils/helpers.dart +++ b/lib/utils/utils.dart @@ -3,7 +3,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/service/NavigationService.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; @@ -13,7 +12,6 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:html/parser.dart'; - import '../UpdatePage.dart'; import '../config/size_config.dart'; import '../locator.dart'; @@ -22,7 +20,7 @@ import 'dr_app_shared_pref.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); -class Helpers { +class TabUtil { static int cupertinoPickerIndex = 0; get currentLanguage => null; diff --git a/lib/widgets/dashboard/out_patient_stack.dart b/lib/widgets/dashboard/out_patient_stack.dart index 39dce7eb..55b7c0e2 100644 --- a/lib/widgets/dashboard/out_patient_stack.dart +++ b/lib/widgets/dashboard/out_patient_stack.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/screens/home/label.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -56,8 +56,8 @@ class GetOutPatientStack extends StatelessWidget { Container( padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5), child: Label( - firstLine: Helpers.getLabelFromKPI(value.kPIName), - secondLine: Helpers.getNameFromKPI(value.kPIName), + firstLine: TabUtil.getLabelFromKPI(value.kPIName), + secondLine: TabUtil.getNameFromKPI(value.kPIName), color: Color(0xFF2B353E), firstLineFontSize: SizeConfig.getHeightMultiplier(height: barHeight) * diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index 94424b78..5b048fde 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -19,7 +19,7 @@ class MyScheduleWidget extends StatelessWidget { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - List workingHours = Helpers.getWorkingHours( + List workingHours = TabUtil.getWorkingHours( workingHoursTable.workingHours, ); return Container( @@ -101,7 +101,7 @@ class MyScheduleWidget extends StatelessWidget { Container( width: MediaQuery.of(context).size.width * 0.65, child: AppText( - Helpers + TabUtil .convertToTitleCase( workingHoursTable.clinicName ?? ""), fontSize: MediaQuery.of(context).size.width*0.04, diff --git a/lib/widgets/medicine/medicine_item_widget.dart b/lib/widgets/medicine/medicine_item_widget.dart index 829bae4a..a6ad8652 100644 --- a/lib/widgets/medicine/medicine_item_widget.dart +++ b/lib/widgets/medicine/medicine_item_widget.dart @@ -3,7 +3,7 @@ import 'dart:typed_data'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; @@ -69,7 +69,7 @@ class _MedicineItemWidgetState extends State { crossAxisAlignment:CrossAxisAlignment.start, children: [ AppText( - Helpers.convertToTitleCase(widget.label ?? ''), + TabUtil.convertToTitleCase(widget.label ?? ''), fontHeight: 1.4, color: AppGlobal.appTextColor, textAlign: TextAlign.start, @@ -78,7 +78,7 @@ class _MedicineItemWidgetState extends State { ), if(widget.showPrice) AppText( - Helpers.convertToTitleCase(widget.price ?? ''), + TabUtil.convertToTitleCase(widget.price ?? ''), fontHeight: 1.4, color: AppGlobal.appTextColor, textAlign: TextAlign.start, diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 0131178c..07f5c060 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:flutter/material.dart'; -import '../../utils/helpers.dart'; +import '../../utils/utils.dart'; class PatientReferralItemWidget extends StatelessWidget { final String referralStatus; @@ -122,7 +122,7 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - Helpers.convertToTitleCase(patientName ?? ""), + TabUtil.convertToTitleCase(patientName ?? ""), fontSize: 16.0, fontWeight: FontWeight.w600, color: Color(0xff2E303A), @@ -160,7 +160,7 @@ class PatientReferralItemWidget extends StatelessWidget { ? TranslationBase.of(context).sameBranch : TranslationBase.of(context) .otherBranch - : " " + Helpers.convertToTitleCase(referralClinic ?? ""), + : " " + TabUtil.convertToTitleCase(referralClinic ?? ""), ), ], ), @@ -252,7 +252,7 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - Helpers.convertToTitleCase(referralDoctorName ?? ""), + TabUtil.convertToTitleCase(referralDoctorName ?? ""), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 14.0, @@ -261,7 +261,7 @@ class PatientReferralItemWidget extends StatelessWidget { ), if (clinicDescription != null) AppText( - Helpers.convertToTitleCase(clinicDescription ?? "") + TabUtil.convertToTitleCase(clinicDescription ?? "") , fontFamily: 'Poppins', fontWeight: FontWeight.w600, diff --git a/lib/widgets/patients/patient_card/PatientCard.dart b/lib/widgets/patients/patient_card/PatientCard.dart index 9debaa1f..51bdb9c8 100644 --- a/lib/widgets/patients/patient_card/PatientCard.dart +++ b/lib/widgets/patients/patient_card/PatientCard.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; @@ -58,7 +58,7 @@ class PatientCard extends StatelessWidget { right: projectViewModel.isArabic ? 0 : 5, bottom: 0, top: 0), - decoration: Helpers.getCardBoxDecoration(), + decoration: TabUtil.getCardBoxDecoration(), child: CardWithBgWidget( padding: 0, marginLeft: (!isMyPatient && isInpatient) || isFromLiveCare ? 0 : 10, @@ -261,12 +261,12 @@ class PatientCard extends StatelessWidget { children: [ AppText( isFromLiveCare - ? Helpers.capitalize( + ? TabUtil.capitalize( patientInfo.fullName) - : (Helpers.capitalize( + : (TabUtil.capitalize( patientInfo.firstName) + " " + - Helpers.capitalize( + TabUtil.capitalize( patientInfo.lastName)), fontSize: 16, color: Color(0xFF2E303A), diff --git a/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart index f667f4cc..f1185b73 100644 --- a/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -96,10 +96,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { Expanded( child: AppText( patient.firstName != null - ? (Helpers.capitalize(patient.firstName) + + ? (TabUtil.capitalize(patient.firstName) + " " + - Helpers.capitalize(patient.lastName)) - : Helpers.capitalize(patient.fullName ?? + TabUtil.capitalize(patient.lastName)) + : TabUtil.capitalize(patient.fullName ?? patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.bold, @@ -343,7 +343,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - Helpers.convertToTitleCase( + TabUtil.convertToTitleCase( '${TranslationBase.of(context).dr}$doctorName'), color: Color(0xFF2E303A), fontWeight: FontWeight.w700, @@ -374,7 +374,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { 0.51, child: HeaderRow( label: 'Clinic: ', - value: Helpers.convertToTitleCase( + value: TabUtil.convertToTitleCase( clinic) ?? '', isExpanded: true), diff --git a/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart index cb031f07..73a54b9d 100644 --- a/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -73,10 +73,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget Expanded( child: AppText( patient.firstName != null - ? (Helpers.capitalize(patient.firstName) + + ? (TabUtil.capitalize(patient.firstName) + " " + - Helpers.capitalize(patient.lastName)) - : Helpers.capitalize(patient.fullName ?? + TabUtil.capitalize(patient.lastName)) + : TabUtil.capitalize(patient.fullName ?? patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.bold, diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 29aef805..65ef5fef 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; @@ -23,7 +23,7 @@ class AppDrawer extends StatefulWidget { } class _AppDrawerState extends State { - Helpers helpers = new Helpers(); + TabUtil helpers = new TabUtil(); ProjectViewModel projectsProvider; @override diff --git a/lib/widgets/shared/dialogs/dailog-list-select.dart b/lib/widgets/shared/dialogs/dailog-list-select.dart index 027244e5..8ccdf844 100644 --- a/lib/widgets/shared/dialogs/dailog-list-select.dart +++ b/lib/widgets/shared/dialogs/dailog-list-select.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:flutter/material.dart'; @@ -77,7 +77,7 @@ class _ListSelectDialogState extends State { Container( height: MediaQuery.of(context).size.height * 0.070, child: TextField( - decoration: Helpers.textFieldSelectorDecoration( + decoration: TabUtil.textFieldSelectorDecoration( widget.hintSearchText ?? TranslationBase.of(context).search, null, diff --git a/lib/widgets/shared/master_key_checkbox_search_widget.dart b/lib/widgets/shared/master_key_checkbox_search_widget.dart index bc391859..ca92d000 100644 --- a/lib/widgets/shared/master_key_checkbox_search_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:flutter/cupertino.dart'; @@ -76,7 +76,7 @@ class _MasterKeyCheckboxSearchWidgetState child: ListView( children: [ AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), + height: TabUtil.getTextFieldHeight(), //MediaQuery.of(context).size.height * 0.070, hintText: TranslationBase.of(context).searchHistory, isTextFieldHasSuffix: true, diff --git a/lib/widgets/shared/text_fields/country_textfield_custom.dart b/lib/widgets/shared/text_fields/country_textfield_custom.dart index fb319a24..67877afe 100644 --- a/lib/widgets/shared/text_fields/country_textfield_custom.dart +++ b/lib/widgets/shared/text_fields/country_textfield_custom.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/utils/helpers.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; @@ -39,7 +39,7 @@ class _CountryTextfieldState extends State { child: InkWell( onTap: widget.elementList != null ? () { - Helpers.hideKeyboard(context); + TabUtil.hideKeyboard(context); ListSelectDialog dialog = ListSelectDialog( list: widget.elementList, attributeName: '${widget.keyName}',