From 26e80356e190781af6c94d6c959ca9dfbf58f6d9 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 17:32:57 +0200 Subject: [PATCH 01/11] first change --- lib/UpdatePage.dart | 2 + lib/client/base_app_client.dart | 13 +- .../viewModel/authentication_view_model.dart | 6 +- lib/core/viewModel/dashboard_view_model.dart | 10 +- lib/landing_page.dart | 2 + lib/main.dart | 2 + .../line_chart_for_diabetic.dart | 9 +- .../profile/lab_result/LineChartCurved.dart | 11 +- .../lab_result/LineChartCurvedLabHistory.dart | 11 +- .../AddVerifyMedicalReport.dart | 5 +- .../profile/vital_sign/LineChartCurved.dart | 10 +- .../LineChartCurvedBloodPressure.dart | 9 +- .../RegisterSearchPatientPage.dart | 2 +- lib/screens/qr_reader/QR_reader_screen.dart | 4 +- .../reschedule-leaves/reschedule_leave.dart | 10 +- lib/util/dr_app_toast_msg.dart | 77 ++--------- lib/widgets/shared/TextFields.dart | 4 +- .../shared/app_expandable_notifier_new.dart | 127 ------------------ lib/widgets/shared/app_loader_widget.dart | 1 - .../text_fields/app_text_form_field.dart | 2 +- .../shared/text_fields/html_rich_editor.dart | 104 +++++++------- .../shared/text_fields/new_text_Field.dart | 6 +- pubspec.yaml | 123 +++++++++-------- 23 files changed, 182 insertions(+), 368 deletions(-) delete mode 100644 lib/widgets/shared/app_expandable_notifier_new.dart diff --git a/lib/UpdatePage.dart b/lib/UpdatePage.dart index 16284ed1..b81e2e4c 100644 --- a/lib/UpdatePage.dart +++ b/lib/UpdatePage.dart @@ -1,3 +1,5 @@ +// @dart=2.9 + import 'dart:io' show Platform; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index af4e6e97..0a7792b2 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -1,3 +1,5 @@ +//@dart=2.9 + import 'dart:convert'; import 'dart:io' show Platform; @@ -107,12 +109,8 @@ class BaseAppClient { var asd = json.encode(body); var asd2; if (await Helpers.checkConnection()) { - final response = await http.post(url, - body: json.encode(body), - headers: { - 'Content-Type': 'application/json', - 'Accept': 'application/json' - }); + final response = await http.post(Uri.parse(url), + body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { onFailure(Helpers.generateContactAdminMsg(), statusCode); @@ -236,8 +234,7 @@ class BaseAppClient { var asd = json.encode(body); var asd2; if (await Helpers.checkConnection()) { - final response = await http.post(url.trim(), - body: json.encode(body), headers: headers); + final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index cad5fa87..58397b32 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -64,8 +64,8 @@ class AuthenticationViewModel extends BaseViewModel { UserModel userInfo = UserModel(); final LocalAuthentication auth = LocalAuthentication(); - List _availableBiometrics; - final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); + List _availableBiometrics; + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; bool isLogin = false; bool unverified = false; @@ -354,7 +354,7 @@ class AuthenticationViewModel extends BaseViewModel { getDeviceInfoFromFirebase() async { _firebaseMessaging.setAutoInitEnabled(true); if (Platform.isIOS) { - _firebaseMessaging.requestNotificationPermissions(); + _firebaseMessaging.requestPermission(); } setState(ViewState.Busy); var token = await _firebaseMessaging.getToken(); diff --git a/lib/core/viewModel/dashboard_view_model.dart b/lib/core/viewModel/dashboard_view_model.dart index 04e63dd9..9b5c781f 100644 --- a/lib/core/viewModel/dashboard_view_model.dart +++ b/lib/core/viewModel/dashboard_view_model.dart @@ -13,7 +13,7 @@ import 'base_view_model.dart'; class DashboardViewModel extends BaseViewModel { - final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; DashboardService _dashboardService = locator(); SpecialClinicsService _specialClinicsService = locator(); @@ -53,13 +53,7 @@ class DashboardViewModel extends BaseViewModel { } Future setFirebaseNotification(AuthenticationViewModel authProvider) async { - _firebaseMessaging.requestNotificationPermissions( - const IosNotificationSettings( - sound: true, badge: true, alert: true, provisional: true)); - _firebaseMessaging.onIosSettingsRegistered - .listen((IosNotificationSettings settings) { - print("Settings registered: $settings"); - }); + _firebaseMessaging.requestPermission(sound: true, badge: true, alert: true, provisional: true); _firebaseMessaging.getToken().then((String token) async { if (token != '') { diff --git a/lib/landing_page.dart b/lib/landing_page.dart index fcdb1eff..2ab56617 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -1,3 +1,5 @@ +//@dart=2.9 + import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/screens/doctor/doctor_replay/doctor_reply_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; diff --git a/lib/main.dart b/lib/main.dart index 37f3d3d0..706994ba 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,3 +1,5 @@ + + import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; diff --git a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart index 671230c2..6d7af553 100644 --- a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart +++ b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart @@ -93,10 +93,10 @@ class LineChartForDiabetic extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, fontSize: 10, - ), + );}, rotateAngle: -65, //rotateAngle:-65, interval: 100, @@ -121,11 +121,10 @@ class LineChartForDiabetic extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontWeight: FontWeight.bold, fontSize: 10, - ), + );}, interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, margin: 12, diff --git a/lib/screens/patients/profile/lab_result/LineChartCurved.dart b/lib/screens/patients/profile/lab_result/LineChartCurved.dart index 89860f44..079c5e90 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurved.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurved.dart @@ -97,10 +97,10 @@ class LineChartCurvedState extends State { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontSize: 11, - ), + fontSize: 10, + );}, margin: 28, rotateAngle:-65, getTitles: (value) { @@ -128,11 +128,10 @@ class LineChartCurvedState extends State { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontWeight: FontWeight.bold, fontSize: 10, - ), + );}, getTitles: (value) { return '${value.toInt()}'; }, diff --git a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart index ea9300d0..126b83c0 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart @@ -98,10 +98,10 @@ class LineChartCurvedLabHistoryState extends State { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontSize: 11, - ), + fontSize: 10, + );}, margin: 28, rotateAngle: -65, getTitles: (value) { @@ -127,11 +127,10 @@ class LineChartCurvedLabHistoryState extends State { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontWeight: FontWeight.bold, fontSize: 10, - ), + );}, getTitles: (value) { return '${value.toInt()}'; }, diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index 72ee1311..b40690ab 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -38,6 +38,7 @@ class AddVerifyMedicalReport extends StatefulWidget { } class _AddVerifyMedicalReportState extends State { + HtmlEditorController _controller = HtmlEditorController(); @override Widget build(BuildContext context) { String txtOfMedicalReport; @@ -100,7 +101,7 @@ class _AddVerifyMedicalReportState extends State { // disabled: progressNoteController.text.isEmpty, fontWeight: FontWeight.w700, onPressed: () async { - txtOfMedicalReport = await HtmlEditor.getText(); + txtOfMedicalReport = await _controller.getText(); if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); @@ -137,7 +138,7 @@ class _AddVerifyMedicalReportState extends State { color: Color(0xff359846), fontWeight: FontWeight.w700, onPressed: () async { - txtOfMedicalReport = await HtmlEditor.getText(); + txtOfMedicalReport = await _controller.getText(); if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport); diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index 564c8c2c..29bf32e8 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; class LineChartCurved extends StatelessWidget { final String title; @@ -110,10 +111,10 @@ class LineChartCurved extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, fontSize: 10, - ), + );}, rotateAngle: -65, //rotateAngle:-65, margin: 22, @@ -162,11 +163,10 @@ class LineChartCurved extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontWeight: FontWeight.bold, fontSize: 10, - ), + );}, getTitles: (value) { // if (timeSeries.length < 10) { // return '${value.toInt()}'; diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 1c387c9a..095367ef 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -128,10 +128,10 @@ class LineChartCurvedBloodPressure extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, fontSize: 10, - ), + );}, rotateAngle: -65, //rotateAngle:-65, margin: 22, @@ -155,11 +155,10 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, - fontWeight: FontWeight.bold, fontSize: 10, - ), + );}, getTitles: (value) { return '${value.toInt()}'; }, diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 69a2c643..3947c3b7 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -292,7 +292,7 @@ class _RegisterSearchPatientPageState extends State { _birthDateInGregorian = selectedDate; birthDateInHijri = HijriCalendar() .gregorianToHijri(selectedDate.year, - selectedDate.month, selectedDate.day); + selectedDate.month, selectedDate.day) as HijriCalendar; print(_birthDateInGregorian); print(birthDateInHijri); diff --git a/lib/screens/qr_reader/QR_reader_screen.dart b/lib/screens/qr_reader/QR_reader_screen.dart index c06a8722..65c6327c 100644 --- a/lib/screens/qr_reader/QR_reader_screen.dart +++ b/lib/screens/qr_reader/QR_reader_screen.dart @@ -1,4 +1,4 @@ -import 'package:barcode_scan_fix/barcode_scan.dart'; +import 'package:barcode_scan2/barcode_scan2.dart'; 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/patient_muse/PatientSearchRequestModel.dart'; @@ -82,7 +82,7 @@ class _QrReaderScreenState extends State { } _scanQrAndGetPatient(BuildContext context, ScanQrViewModel model) async { - var result = await BarcodeScanner.scan(); + var result = (await BarcodeScanner.scan()).rawContent; if (result != "") { List listOfParams = result.split(','); int patientID = 0; diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index 925d0bb7..0e9bff00 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -573,11 +573,11 @@ class _RescheduleLeaveScreen extends State { }, selectedItem: getSelectedDoctor(model2), showSearchBox: true, - searchBoxDecoration: InputDecoration( - border: OutlineInputBorder(), - contentPadding: EdgeInsets.fromLTRB(12, 12, 8, 0), - labelText: "Search Doctor", - ), + // searchBoxDecoration: InputDecoration( + // border: OutlineInputBorder(), + // contentPadding: EdgeInsets.fromLTRB(12, 12, 8, 0), + // labelText: "Search Doctor", + // ), popupTitle: Container( height: 50, decoration: BoxDecoration( diff --git a/lib/util/dr_app_toast_msg.dart b/lib/util/dr_app_toast_msg.dart index 76950ae5..f0103d5f 100644 --- a/lib/util/dr_app_toast_msg.dart +++ b/lib/util/dr_app_toast_msg.dart @@ -1,79 +1,26 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; +import 'package:fluttertoast/fluttertoast.dart'; class DrAppToastMsg { - void showLongToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, - toastLength: Toast.LENGTH_LONG, - ); - } - static void showSuccesToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, + Fluttertoast.showToast( + msg: msg, toastLength: Toast.LENGTH_SHORT, - backgroundColor: AppGlobal.appGreenColor, - icon: ICON.SUCCESS, - fontSize: 16, - imageSize: 35, - textColor: Colors.white); + gravity: ToastGravity.TOP, + // timeInSecForIosWeb: timeInSeconds, + backgroundColor: Colors.green, + textColor: Colors.white, + fontSize: 16); } static void showErrorToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, + Fluttertoast.showToast( + msg: msg, toastLength: Toast.LENGTH_SHORT, - toastGravity: ToastGravity.TOP, + gravity: ToastGravity.TOP, backgroundColor: Colors.red, - icon: ICON.CLOSE, - fontSize: 16, - imageSize: 35, - timeInSeconds: 912, - textColor: Colors.white); - } - - static void showShortToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, - toastLength: Toast.LENGTH_SHORT, - icon: ICON.INFO, - timeInSeconds: 1); - } - - static void showTopShortToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, - toastLength: Toast.LENGTH_SHORT, - toastGravity: ToastGravity.TOP, - icon: ICON.WARNING, - timeInSeconds: 1); - } - - static void showCenterShortToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, - toastLength: Toast.LENGTH_SHORT, - toastGravity: ToastGravity.CENTER, - icon: ICON.WARNING, - timeInSeconds: 1); - } - - static void showCenterShortLoadingToast(msg) { - FlutterFlexibleToast.showToast( - message: msg, - toastLength: Toast.LENGTH_LONG, - toastGravity: ToastGravity.BOTTOM, - icon: ICON.LOADING, - radius: 20, - elevation: 10, textColor: Colors.white, - - timeInSeconds: 2); - } - - static void cancelToast(msg) { - FlutterFlexibleToast.cancel(); + fontSize: 16); } } diff --git a/lib/widgets/shared/TextFields.dart b/lib/widgets/shared/TextFields.dart index 18d8e778..3674e144 100644 --- a/lib/widgets/shared/TextFields.dart +++ b/lib/widgets/shared/TextFields.dart @@ -225,7 +225,7 @@ class _TextFieldsState extends State { onTap: widget.onTapTextFields, keyboardAppearance: Theme.of(context).brightness, scrollPhysics: BouncingScrollPhysics(), - autovalidate: widget.autoValidate, + // autovalidate: widget.autoValidate, textCapitalization: widget.textCapitalization, onFieldSubmitted: widget.inputAction == TextInputAction.next ? (widget.onSubmit != null @@ -266,7 +266,7 @@ class _TextFieldsState extends State { fontSize: widget.fontSize, fontWeight: widget.fontWeight), inputFormatters: widget.keyboardType == TextInputType.phone ? [ - WhitelistingTextInputFormatter.digitsOnly, + // WhitelistingTextInputFormatter.digitsOnly, _mobileFormatter, ] : widget.inputFormatters, diff --git a/lib/widgets/shared/app_expandable_notifier_new.dart b/lib/widgets/shared/app_expandable_notifier_new.dart deleted file mode 100644 index 848f5265..00000000 --- a/lib/widgets/shared/app_expandable_notifier_new.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:expandable/expandable.dart'; -import 'package:flutter/material.dart'; - - -/// App Expandable Notifier with animation -/// [headerWidget] widget want to show in the header -/// [bodyWidget] widget want to show in the body -/// [title] the widget title -/// [collapsed] The widget shown in the collapsed state -class AppExpandableNotifier extends StatefulWidget { - final Widget headerWidget; - final Widget bodyWidget; - final String title; - final Widget collapsed; - final bool isExpand; - bool expandFlag = false; - var controller = new ExpandableController(); - AppExpandableNotifier( - {this.headerWidget, - this.bodyWidget, - this.title, - this.collapsed, - this.isExpand = false}); - - _AppExpandableNotifier createState() => _AppExpandableNotifier(); -} - -class _AppExpandableNotifier extends State { - - @override - void initState() { - setState(() { - if (widget.isExpand) { - widget.expandFlag = widget.isExpand; - widget.controller.expanded = true; - } - }); - super.initState(); - } - - @override - Widget build(BuildContext context) { - - return ExpandableNotifier( - child: Padding( - padding: const EdgeInsets.only(left: 10, right: 10, top: 4), - child: Card( - color: Colors.grey[200], - clipBehavior: Clip.antiAlias, - child: Column( - children: [ - SizedBox( - child: widget.headerWidget, - ), - ScrollOnExpand( - scrollOnExpand: true, - scrollOnCollapse: false, - child: ExpandablePanel( - hasIcon: false, - theme: const ExpandableThemeData( - headerAlignment: ExpandablePanelHeaderAlignment.center, - tapBodyToCollapse: true, - ), - header: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.all(10), - child: Text( - widget.title ?? TranslationBase.of(context).details, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2, - ), - ), - ), - ), - IconButton( - icon: new Container( - height: 28.0, - width: 30.0, - decoration: new BoxDecoration( - color: Theme.of(context).primaryColor, - shape: BoxShape.circle, - ), - child: new Center( - child: new Icon( - widget.expandFlag - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - color: Colors.white, - size: 30.0, - ), - ), - ), - onPressed: () { - setState(() { - widget.expandFlag = !widget.expandFlag; - widget.controller.expanded = widget.expandFlag; - }); - }), - ]), - collapsed: widget.collapsed ?? Container(), - expanded: widget.bodyWidget, - builder: (_, collapsed, expanded) { - return Padding( - padding: EdgeInsets.only(left: 5, right: 5, bottom: 5), - child: Expandable( - controller: widget.controller, - collapsed: collapsed, - expanded: expanded, - theme: const ExpandableThemeData(crossFadePoint: 0), - ), - ); - }, - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/widgets/shared/app_loader_widget.dart b/lib/widgets/shared/app_loader_widget.dart index 4b6d753b..87412b90 100644 --- a/lib/widgets/shared/app_loader_widget.dart +++ b/lib/widgets/shared/app_loader_widget.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:progress_hud_v2/progress_hud.dart'; import 'loader/gif_loader_container.dart'; diff --git a/lib/widgets/shared/text_fields/app_text_form_field.dart b/lib/widgets/shared/text_fields/app_text_form_field.dart index cf5f0abf..7d3a06da 100644 --- a/lib/widgets/shared/text_fields/app_text_form_field.dart +++ b/lib/widgets/shared/text_fields/app_text_form_field.dart @@ -27,7 +27,7 @@ class AppTextFormField extends FormField { : super( onSaved: onSaved, validator: validator, - autovalidate: autovalidate, + // autovalidate: autovalidate, builder: (FormFieldState state) { return Column( children: [ diff --git a/lib/widgets/shared/text_fields/html_rich_editor.dart b/lib/widgets/shared/text_fields/html_rich_editor.dart index 71359604..99c3f547 100644 --- a/lib/widgets/shared/text_fields/html_rich_editor.dart +++ b/lib/widgets/shared/text_fields/html_rich_editor.dart @@ -12,7 +12,16 @@ import 'package:speech_to_text/speech_to_text.dart' as stt; import '../speech-text-popup.dart'; class HtmlRichEditor extends StatefulWidget { - HtmlRichEditor({ + final String hint; + final String initialText; + final double height; + final BoxDecoration decoration; + final bool darkMode; + final bool showBottomToolbar; + final List toolbar; + final HtmlEditorController controller; + + HtmlRichEditor({ key, this.hint = "Your text here...", this.initialText, @@ -21,26 +30,19 @@ class HtmlRichEditor extends StatefulWidget { this.darkMode = false, this.showBottomToolbar = false, this.toolbar, + this.controller, }) : super(key: key); - final String hint; - final String initialText; - final double height; - final BoxDecoration decoration; - final bool darkMode; - final bool showBottomToolbar; - final List toolbar; - @override _HtmlRichEditorState createState() => _HtmlRichEditorState(); } class _HtmlRichEditorState extends State { - ProjectViewModel projectViewModel; + ProjectViewModel projectViewModel; stt.SpeechToText speech = stt.SpeechToText(); var recognizedWord; var event = RobotProvider(); - + @override void initState() { @@ -64,51 +66,42 @@ class _HtmlRichEditorState extends State { return Stack( children: [ HtmlEditor( - hint: widget.hint, - height: widget.height, - initialText: widget.initialText, - showBottomToolbar: widget.showBottomToolbar, - darkMode: widget.darkMode, - decoration: widget.decoration ?? - BoxDecoration( - color: Colors.transparent, - borderRadius: BorderRadius.all( - Radius.circular(30.0), - ), - border: Border.all(color: Colors.grey[200], width: 0.5), - ), - toolbar: widget.toolbar ?? - const [ - // Style(), - Font(buttons: [ - FontButtons.bold, - FontButtons.italic, - FontButtons.underline, - ]), - // ColorBar(buttons: [ColorButtons.color]), - Paragraph(buttons: [ - ParagraphButtons.ul, - ParagraphButtons.ol, - ParagraphButtons.paragraph - ]), - // Insert(buttons: [InsertButtons.link, InsertButtons.picture, InsertButtons.video, InsertButtons.table]), - // Misc(buttons: [MiscButtons.fullscreen, MiscButtons.codeview, MiscButtons.help]) - ], - ), + controller: widget.controller, + htmlToolbarOptions: HtmlToolbarOptions(defaultToolbarButtons: [ + StyleButtons(), + FontSettingButtons(), + FontButtons(), + // ColorButtons(), + ListButtons(), + ParagraphButtons(), + // InsertButtons(), + // OtherButtons(), + ]), + htmlEditorOptions: HtmlEditorOptions( + hint: widget.hint, + initialText: widget.initialText, + darkMode: widget.darkMode, + ), + otherOptions: OtherOptions( + height: widget.height, + decoration: widget.decoration ?? + BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.all( + Radius.circular(30.0), + ), + border: Border.all(color: Colors.grey[200], width: 0.5), + ), + )), Positioned( - top: - 50, //MediaQuery.of(context).size.height * 0, - right: projectViewModel.isArabic - ? MediaQuery.of(context).size.width * 0.75 - : 15, + top: 50, //MediaQuery.of(context).size.height * 0, + right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * 0.75 : 15, child: Column( children: [ IconButton( - icon: Icon(DoctorApp.speechtotext, - color: Colors.black, size: 35), + icon: Icon(DoctorApp.speechtotext, color: Colors.black, size: 35), onPressed: () { - initSpeechState() - .then((value) => {onVoiceText()}); + initSpeechState().then((value) => {onVoiceText()}); }, ), ], @@ -121,8 +114,7 @@ class _HtmlRichEditorState extends State { onVoiceText() async { new SpeechToText(context: context).showAlertDialog(context); var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; - bool available = await speech.initialize( - onStatus: statusListener, onError: errorListener); + bool available = await speech.initialize(onStatus: statusListener, onError: errorListener); if (available) { speech.listen( onResult: resultListener, @@ -150,15 +142,15 @@ class _HtmlRichEditorState extends State { ].request(); } - void resultListener(result)async { + void resultListener(result) async { recognizedWord = result.recognizedWords; event.setValue({"searchText": recognizedWord}); - String txt = await HtmlEditor.getText(); + String txt = await widget.controller.getText(); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); speech.stop(); - HtmlEditor.setText(txt+recognizedWord); + widget.controller.setText(txt + recognizedWord); }); } else { print(result.finalResult); diff --git a/lib/widgets/shared/text_fields/new_text_Field.dart b/lib/widgets/shared/text_fields/new_text_Field.dart index 9917b04f..2979bfd4 100644 --- a/lib/widgets/shared/text_fields/new_text_Field.dart +++ b/lib/widgets/shared/text_fields/new_text_Field.dart @@ -172,7 +172,7 @@ class _NewTextFieldsState extends State { initialValue: widget.initialValue, keyboardAppearance: Theme.of(context).brightness, scrollPhysics: BouncingScrollPhysics(), - autovalidate: widget.autoValidate, + // autovalidate: widget.autoValidate, textCapitalization: widget.textCapitalization, onFieldSubmitted: widget.inputAction == TextInputAction.next ? (widget.onSubmit != null @@ -195,11 +195,11 @@ class _NewTextFieldsState extends State { autofocus: widget.autoFocus ?? false, validator: widget.validator, onSaved: widget.onSaved, - style: Theme.of(context).textTheme.body2.copyWith( + style: Theme.of(context).textTheme.bodyText1.copyWith( fontSize: widget.fontSize, fontWeight: widget.fontWeight, color: Color(0xFF575757), fontFamily: 'Poppins'), inputFormatters: widget.keyboardType == TextInputType.phone ? [ - WhitelistingTextInputFormatter.digitsOnly, + // WhitelistingTextInputFormatter.digitsOnly, _mobileFormatter, ] : widget.inputFormatters, diff --git a/pubspec.yaml b/pubspec.yaml index 1e5125de..766f55cb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,101 +11,110 @@ description: A new Flutter project. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.2+2 +version: 4.3.5+1 + environment: - sdk: ">=2.8.0 <3.0.0" + sdk: ">=2.7.0 <3.0.0" #dependency_overrides: # intl: 0.17.0-nullsafety.2 +#dependency_overrides: +# intl: 0.17.0-nullsafety.2 dependencies: flutter: sdk: flutter - hexcolor: ^1.0.1 + hexcolor: ^2.0.4 flutter_localizations: sdk: flutter - flutter_device_type: ^0.2.0 - intl: ^0.16.0 - http: ^0.12.0+4 - provider: ^4.0.5+1 - shared_preferences: ^0.5.6+3 - imei_plugin: ^1.1.6 - flutter_flexible_toast: ^0.1.4 - local_auth: ^0.6.1+3 - http_interceptor: ^0.2.0 - progress_hud_v2: ^2.0.0 - connectivity: ^0.4.8+2 - maps_launcher: ^1.2.0 - url_launcher: ^5.4.5 - charts_flutter: ^0.9.0 + flutter_device_type: ^0.4.0 + intl: ^0.17.0 + http: ^0.13.0 + provider: ^6.0.1 + shared_preferences: ^2.0.6 + # imei_plugin: ^1.2.0 + # flutter_flexible_toast: ^0.1.4 + fluttertoast: ^8.0.8 + local_auth: ^1.1.6 + http_interceptor: ^0.4.1 + + connectivity: ^3.0.6 + maps_launcher: ^2.0.0 + url_launcher: ^6.0.6 + charts_flutter: ^0.12.0 flutter_swiper: ^1.1.6 #Icons - eva_icons_flutter: ^2.0.0 - font_awesome_flutter: ^8.11.0 - dropdown_search: ^0.4.8 - flutter_staggered_grid_view: ^0.3.2 + eva_icons_flutter: ^3.0.0 + font_awesome_flutter: ^9.0.0 + dropdown_search: ^2.0.1 + flutter_staggered_grid_view: ^0.4.0 - expandable: ^4.1.4 + expandable: ^5.0.1 # Qr code Scanner - barcode_scan_fix: ^1.0.2 + barcode_scan2: ^4.1.4 # permissions - permission_handler: ^5.0.0+hotfix.3 - device_info: ^0.4.2+4 + permission_handler: ^8.0.1 + device_info: ^2.0.2 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 + cupertino_icons: ^1.0.3 # SVG - flutter_svg: ^0.18.1 - percent_indicator: ^2.1.1 + #flutter_svg: ^1.0.0 + percent_indicator: ^3.0.1 #Dependency Injection - get_it: ^4.0.2 + get_it: ^7.1.3 #chart - fl_chart: ^0.12.1 + fl_chart: ^0.36.1 # Firebase - firebase_messaging: ^7.0.3 - firebase_analytics: 6.3.0 + firebase_messaging: ^10.0.1 + firebase_analytics : ^8.3.4 #GIF image flutter_gifimage: ^1.0.1 #Autocomplete TextField autocomplete_textfield: ^1.7.3 - date_time_picker: ^1.1.1 + date_time_picker: ^2.0.0 # Html - html: ^0.14.0+4 + html: ^0.15.0 # Flutter Html View - flutter_html: 1.0.2 - sticky_headers: "^0.1.8" + flutter_html: ^2.1.0 + sticky_headers: ^0.2.0 + file_picker: ^3.0.2+2 #speech to text speech_to_text: path: speech_to_text - quiver: ^2.1.5 + quiver: ^3.0.0 + flutter_colorpicker: ^0.5.0 # Html Editor Enhanced - html_editor_enhanced: ^1.3.0 + html_editor_enhanced: ^2.1.1 #Network Image - cached_network_image: ^2.5.0 + cached_network_image: ^3.1.0+1 # Badges - badges: ^1.1.4 + badges: ^2.0.1 - # Hijri -# hijri: ^2.0.3 - hijri_picker: ^2.0.0 + # Hijri + # hijri: ^2.0.3 + hijri_picker: ^3.0.0 + + # flutter_math_fork: ^0.6.0 +# flutter_math_fork: ^0.6.0 @@ -152,20 +161,20 @@ flutter: - family: Poppins fonts: - - asset: assets/fonts/Poppins/Poppins-Regular.ttf - weight: 400 - - asset: assets/fonts/Poppins/Poppins-Medium.ttf - weight: 500 - - asset: assets/fonts/Poppins/Poppins-SemiBold.ttf - weight: 600 - - asset: assets/fonts/Poppins/Poppins-Bold.ttf - weight: 700 - - asset: assets/fonts/Poppins/Poppins-Bold.ttf - weight: 800 - - asset: assets/fonts/Poppins/Poppins-Bold.ttf - weight: 900 - - + - asset: assets/fonts/Poppins/Poppins-Regular.ttf + weight: 400 + - asset: assets/fonts/Poppins/Poppins-Medium.ttf + weight: 500 + - asset: assets/fonts/Poppins/Poppins-SemiBold.ttf + weight: 600 + - asset: assets/fonts/Poppins/Poppins-Bold.ttf + weight: 700 + - asset: assets/fonts/Poppins/Poppins-Bold.ttf + weight: 800 + - asset: assets/fonts/Poppins/Poppins-Bold.ttf + weight: 900 + + # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf From 0c4d6da3f4fbbdaedba7ecb2f2c0b04127f483ce Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 17:42:50 +0200 Subject: [PATCH 02/11] update gradel --- android/build.gradle | 5 +++-- android/gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index bf0f679d..ae74fcf6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.3' } @@ -17,7 +17,8 @@ allprojects { google() jcenter() mavenCentral() - maven { url 'https://tokbox.bintray.com/maven' } + maven { url 'https://developer.huawei.com/repo/' } +// maven { url 'https://tokbox.bintray.com/maven' } } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 296b146b..ed1a787b 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip From 73cc5e4b00eef98b72165a6a2efab370d79b165f Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 18:11:56 +0200 Subject: [PATCH 03/11] fix issues --- .../out_patient/out_patient_screen.dart | 1 + .../patient-referral-item-widget.dart | 69 +++++++------------ 2 files changed, 26 insertions(+), 44 deletions(-) diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index a43a4582..b59824b0 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -84,6 +84,7 @@ class _OutPatientsScreenState extends State { @override Widget build(BuildContext context) { authenticationViewModel = Provider.of(context); + projectsProvider = Provider.of(context); _times = [ TranslationBase.of(context).previous, TranslationBase.of(context).today, diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 0e077895..d4e18fc3 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -108,15 +108,13 @@ class PatientReferralItemWidget extends StatelessWidget { Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - child: AppText( - patientName, - fontSize: 16.0, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - fontFamily: 'Poppins', - letterSpacing: -0.64, - ), + AppText( + patientName, + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + letterSpacing: -0.64, ), SizedBox( width: 0, @@ -148,34 +146,23 @@ class PatientReferralItemWidget extends StatelessWidget { Expanded( child: Column( children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - CustomRow( - label: - TranslationBase.of(context).fileNumber, - value: patientID, - ), - ], + CustomRow( + label: + TranslationBase.of(context).fileNumber, + value: patientID, ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRow( - label: isSameBranch + CustomRow( + label: isSameBranch + ? TranslationBase.of(context) + .referredFrom + : TranslationBase.of(context).refClinic, + value: !isReferralClinic + ? isSameBranch ? TranslationBase.of(context) - .referredFrom - : TranslationBase.of(context).refClinic, - value: !isReferralClinic - ? isSameBranch - ? TranslationBase.of(context) - .sameBranch - : TranslationBase.of(context) - .otherBranch - : " " + referralClinic, - ), - ], + .sameBranch + : TranslationBase.of(context) + .otherBranch + : " " + referralClinic, ), ], ), @@ -207,15 +194,9 @@ class PatientReferralItemWidget extends StatelessWidget { ) ], ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRow( - label: TranslationBase.of(context).remarks + " : ", - value: remark ?? "", - ), - ], + CustomRow( + label: TranslationBase.of(context).remarks + " : ", + value: remark ?? "", ), Row( crossAxisAlignment: CrossAxisAlignment.start, From 4dc93f7c311cd8b6c590e9d25481cca773a31f77 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 29 Dec 2021 12:27:18 +0200 Subject: [PATCH 04/11] fix issues with text fields --- .../shared/text_fields/app-textfield-custom.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index 769cd4f8..28331c6c 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -96,7 +96,7 @@ class _AppTextFieldCustomState extends State { Container( height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 - : MediaQuery.of(context).size.height * 0.098, + : null,//MediaQuery.of(context).size.height * 0.098, decoration: widget.hasBorder ? TextFieldsUtils.containerBorderDecoration( Color(0Xffffffff), @@ -117,7 +117,7 @@ class _AppTextFieldCustomState extends State { padding: widget.dropDownText == null ? widget.isSearchTextField ? EdgeInsets.only(top: 10) - : EdgeInsets.only(top: 7.5) + : EdgeInsets.only(top: 0.5) : EdgeInsets.only(top: 0), // 8.0 child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -144,8 +144,7 @@ class _AppTextFieldCustomState extends State { height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 - : MediaQuery.of(context).size.height * - 0.045, + : null, child: TextFormField( textAlign: projectViewModel.isArabic ? TextAlign.right @@ -156,8 +155,7 @@ class _AppTextFieldCustomState extends State { .textFieldSelectorDecoration( widget.hintText, null, true), style: TextStyle( - fontSize: - 14.0, //SizeConfig.textMultiplier * 1.7, + fontSize: SizeConfig.textMultiplier * 1.7, fontFamily: 'Poppins', color: Color(0xFF575757), fontWeight: FontWeight.w400, From 558de8ec757e922ce54f64b1aa17d0b59290f2d3 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 29 Dec 2021 12:28:58 +0200 Subject: [PATCH 05/11] fix issues with text fields --- .../referral/refer-patient-screen.dart | 21 ++++++++++--------- .../patient-referral-item-widget.dart | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index f9371834..e9ba4770 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -123,16 +123,17 @@ class _PatientMakeReferralScreenState extends State { model.patientReferral.length - 1] .patientDetails .gender, - referredDate: model - .patientReferral[ - model.patientReferral.length - 1] - .referredOn - .split(" ")[0], - referredTime: model - .patientReferral[ - model.patientReferral.length - 1] - .referredOn - .split(" ")[1], + ///TODO Elham* check this + // referredDate: model + // .patientReferral[ + // model.patientReferral.length - 1] + // .referredOn + // .split(" ")[0], + // referredTime: model + // .patientReferral[ + // model.patientReferral.length - 1] + // .referredOn + // .split(" ")[1], patientID: "${model.patientReferral[model.patientReferral.length - 1].patientID}", isSameBranch: model diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index d4e18fc3..07f8352e 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -96,7 +96,7 @@ class PatientReferralItemWidget extends StatelessWidget { : Colors.red[900], ), AppText( - referredDate, + referredDate??"", fontFamily: 'Poppins', fontWeight: FontWeight.w600, letterSpacing: -0.48, @@ -109,7 +109,7 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - patientName, + patientName??"", fontSize: 16.0, fontWeight: FontWeight.w600, color: Color(0xff2E303A), @@ -130,7 +130,7 @@ class PatientReferralItemWidget extends StatelessWidget { width: 4, ), AppText( - referredTime, + referredTime??"", fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 12.0, From c54015c5c1eb4f8adbc1e12eb903b407d329eeea Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 29 Dec 2021 12:55:36 +0200 Subject: [PATCH 06/11] fix button inside our app --- .../project.xcworkspace/contents.xcworkspacedata | 2 +- lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart | 4 ++-- .../profile/referral/my-referral-detail-screen.dart | 3 +-- .../referral/referral_patient_detail_in-paint.dart | 1 - .../referral/referred_patient_detail_in-paint.dart | 1 - .../register_patient/RegisterConfirmationPatientPage.dart | 4 ++-- .../patients/register_patient/RegisterPatientPage.dart | 8 ++++---- .../register_patient/RegisterSearchPatientPage.dart | 4 ++-- .../patients/register_patient/VerifyMethodPage.dart | 4 ++-- lib/widgets/shared/buttons/app_buttons_widget.dart | 7 +++++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16..919434a6 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index b6fce680..4d4fee06 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -177,7 +177,7 @@ class _UCAFPagerScreenState extends State borderColor: Colors.white, color: Colors.white, fontColor: Color(0xFFB8382B), - fontSize: 2.2, + onPressed: () { Navigator.of(context).popUntil((route) { return route.settings.name == PATIENTS_PROFILE; @@ -199,7 +199,7 @@ class _UCAFPagerScreenState extends State borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 2.0, + onPressed: () { model.saveUCAFOnTap(); }, 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 bd349f0f..dfdb492b 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -374,7 +374,6 @@ class MyReferralDetailScreen extends StatelessWidget { title: TranslationBase.of(context).accept, color: Color(0xFF4BA821), fontColor: Colors.white, - fontSize: 1.6, hPadding: 8, vPadding: 12, disabled: model.state == ViewState.Busy, @@ -401,7 +400,7 @@ class MyReferralDetailScreen extends StatelessWidget { title: TranslationBase.of(context).reject, color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 1.6, + hPadding: 8, vPadding: 12, disabled: model.state == ViewState.Busy, 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 d88d5a95..64a7e293 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 @@ -486,7 +486,6 @@ class ReferralPatientDetailScreen extends StatelessWidget { color: Colors.red[700], fontColor: Colors.white, fontWeight: FontWeight.w700, - fontSize: 1.8, hPadding: 8, vPadding: 12, onPressed: () async { 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 21634d0f..401da0aa 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 @@ -565,7 +565,6 @@ class ReferredPatientDetailScreen extends StatelessWidget { color: Colors.red[700], fontColor: Colors.white, fontWeight: FontWeight.w700, - fontSize: 1.8, hPadding: 8, vPadding: 12, disabled: referredPatient.referredDoctorRemarks == null diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index 6443e972..136e33ad 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -366,7 +366,7 @@ class _RegisterConfirmationPatientPageState borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, + onPressed: () { Navigator.of(context).pop(); }, @@ -386,7 +386,7 @@ class _RegisterConfirmationPatientPageState borderColor: Color(0xFFB8382B), color: HexColor("#D02127"), fontColor: Colors.white, - fontSize: 2.0, + onPressed: () async { setState(() { isSubmitted = true; diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart index e7423f89..902f98c6 100644 --- a/lib/screens/patients/register_patient/RegisterPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -143,7 +143,7 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, + onPressed: () { Navigator.of(context).pop(); }, @@ -163,7 +163,7 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFF359846), color: Color(0xFF359846), fontColor: Colors.white, - fontSize: 2.0, + onPressed: () {}, ), ), @@ -186,7 +186,7 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, + onPressed: () { Navigator.of(context).pop(); }, @@ -206,7 +206,7 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 2.0, + onPressed: () { changePageViewIndex(_currentIndex + 1); }, diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 3947c3b7..6afeb0dc 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -326,7 +326,7 @@ class _RegisterSearchPatientPageState extends State { borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, + onPressed: () { Navigator.of(context).pop(); }, @@ -346,7 +346,7 @@ class _RegisterSearchPatientPageState extends State { borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 2.0, + onPressed: () async { setState(() { isSubmitted = true; diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart index 9636f2ca..d1915058 100644 --- a/lib/screens/patients/register_patient/VerifyMethodPage.dart +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -440,7 +440,7 @@ class _ActivationPageState extends State { borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, + onPressed: () { Navigator.of(context).pop(); }, @@ -460,7 +460,7 @@ class _ActivationPageState extends State { borderColor: Color(0xFFB8382B), color: HexColor("#D02127"), fontColor: Colors.white, - fontSize: 2.0, + onPressed: () async { GifLoaderDialogUtils.showMyDialog(context); await widget.model.checkActivationCode( diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index bb43dc8c..ec29c842 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -13,7 +13,7 @@ class AppButton extends StatefulWidget { final IconData iconData; final Widget icon; final Color color; - final double fontSize; + double fontSize; final double padding; final Color fontColor; final bool loading; @@ -32,7 +32,7 @@ class AppButton extends StatefulWidget { this.iconData, this.icon, this.color, - this.fontSize = 16, + this.fontSize, this.padding = 13, this.loading = false, this.disabled = false, @@ -52,6 +52,9 @@ class AppButton extends StatefulWidget { class _AppButtonState extends State { @override Widget build(BuildContext context) { + if(widget.fontSize == null ) { + widget.fontSize = SizeConfig.getHeightMultiplier() * 1.9; + } return Container( // height: MediaQuery.of(context).size.height * 0.075, height: widget.height, From d66bc3ea2a3c8d9c2e2f022dcf25e202c152a3c2 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 29 Dec 2021 15:18:14 +0200 Subject: [PATCH 07/11] fix issues on html editor --- ios/Podfile | 85 +++-------- ios/Runner.xcodeproj/project.pbxproj | 142 ++++++++++++++---- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../AddVerifyMedicalReport.dart | 1 + 4 files changed, 137 insertions(+), 93 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index c2335042..1d3f65fc 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -10,83 +10,38 @@ project 'Runner', { 'Release' => :release, } -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end - generated_key_values = {} - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) do |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - generated_key_values[podname] = podpath - else - puts "Invalid plugin specification: #{line}" - end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches end - generated_key_values + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + target 'Runner' do use_frameworks! use_modular_headers! - - # Flutter Pod - - copied_flutter_dir = File.join(__dir__, 'Flutter') - copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') - copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') - unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) - # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. - # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. - # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. - - generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') - unless File.exist?(generated_xcode_build_settings_path) - raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) - cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; - - unless File.exist?(copied_framework_path) - FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) - end - unless File.exist?(copied_podspec_path) - FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) - end - end - # Keep pod path relative so it can be checked into Podfile.lock. - pod 'Flutter', :path => 'Flutter' - pod 'OpenTok' - pod 'Alamofire', '~> 5.2' - pod 'AADraggableView' - # Plugin Pods + pod 'Flutter', :path => 'Flutter' + pod 'OpenTok' + pod 'Alamofire', '~> 5.2' + pod 'AADraggableView' + # Plugin Pods - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.each do |name, path| - symlink = File.join('.symlinks', 'plugins', name) - File.symlink(path, symlink) - pod name, :path => File.join(symlink, 'ios') - end + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. -install! 'cocoapods', :disable_input_output_paths => true - post_install do |installer| installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end + flutter_additional_ios_build_settings(target) end end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 80868187..41e65f70 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -14,13 +14,13 @@ 30F70E6C266F56FD005D8F8E /* MainAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */; }; 30F70E6F266F6509005D8F8E /* VideoCallRequestParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6E266F6509005D8F8E /* VideoCallRequestParameters.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 3D7F2AC9B3EBF568D59B943B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 9CE61EBD24AB366E008D68DD /* VideoCallViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CE61EBC24AB366E008D68DD /* VideoCallViewController.swift */; }; 9CE61ECD24ADBB4C008D68DD /* ICallProtocoll.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CE61ECC24ADBB4C008D68DD /* ICallProtocoll.swift */; }; - B650DC3076E9D70CB188286A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -37,10 +37,13 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0762701A9540BA69842BCA9C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 29211CD725C165D600DD740D /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = ""; }; 29211E4125C172B700DD740D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 2ADF20AFB51DAEC9BED1884D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 300790F9266FB14B0052174C /* VCEmbeder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VCEmbeder.swift; sourceTree = ""; }; 300790FB26710CAB0052174C /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainAppViewController.swift; sourceTree = ""; }; @@ -48,9 +51,7 @@ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 75DD06875D42C7903A76DF9F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -60,8 +61,7 @@ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9CE61EBC24AB366E008D68DD /* VideoCallViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCallViewController.swift; sourceTree = ""; }; 9CE61ECC24ADBB4C008D68DD /* ICallProtocoll.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICallProtocoll.swift; sourceTree = ""; }; - 9D4B7DB43C6A6C849D2387CE /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - E698D7B14B12DF768FE47A1A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + E5CA53445955DBB6BB6D164C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -69,7 +69,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B650DC3076E9D70CB188286A /* Pods_Runner.framework in Frameworks */, + 3D7F2AC9B3EBF568D59B943B /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -104,9 +104,9 @@ 7D66D387293CE5376A07EC5F /* Pods */ = { isa = PBXGroup; children = ( - E698D7B14B12DF768FE47A1A /* Pods-Runner.debug.xcconfig */, - 75DD06875D42C7903A76DF9F /* Pods-Runner.release.xcconfig */, - 9D4B7DB43C6A6C849D2387CE /* Pods-Runner.profile.xcconfig */, + 2ADF20AFB51DAEC9BED1884D /* Pods-Runner.debug.xcconfig */, + E5CA53445955DBB6BB6D164C /* Pods-Runner.release.xcconfig */, + 0762701A9540BA69842BCA9C /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -129,7 +129,7 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 7D66D387293CE5376A07EC5F /* Pods */, - F984EB986238F1809678CD84 /* Frameworks */, + C1938275850F66EAA5D7AC0F /* Frameworks */, ); sourceTree = ""; }; @@ -171,10 +171,10 @@ name = "Supporting Files"; sourceTree = ""; }; - F984EB986238F1809678CD84 /* Frameworks */ = { + C1938275850F66EAA5D7AC0F /* Frameworks */ = { isa = PBXGroup; children = ( - 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */, + 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -186,14 +186,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 986D76F6694E0D6D8C5CDAAB /* [CP] Check Pods Manifest.lock */, + C79BE4619064E868C0DFBD12 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 08568E6EE9BA48E55B7C3865 /* [CP] Embed Pods Frameworks */, + 3DBDEDAE0EB70F8613EE7963 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -210,7 +210,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -253,34 +253,113 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 08568E6EE9BA48E55B7C3865 /* [CP] Embed Pods Frameworks */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "[CP] Embed Pods Frameworks"; + name = "Thin Binary"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 3DBDEDAE0EB70F8613EE7963 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/AADraggableView/AADraggableView.framework", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework", + "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", + "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", + "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", + "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", + "${BUILT_PRODUCTS_DIR}/MTBBarcodeScanner/MTBBarcodeScanner.framework", + "${BUILT_PRODUCTS_DIR}/OrderedSet/OrderedSet.framework", + "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", + "${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework", + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", + "${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework", + "${BUILT_PRODUCTS_DIR}/Toast/Toast.framework", + "${BUILT_PRODUCTS_DIR}/Try/Try.framework", + "${BUILT_PRODUCTS_DIR}/barcode_scan2/barcode_scan2.framework", + "${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework", + "${BUILT_PRODUCTS_DIR}/device_info/device_info.framework", + "${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework", + "${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework", + "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", + "${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework", + "${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework", + "${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework", + "${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework", + "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", + "${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework", + "${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework", + "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", + "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", + "${BUILT_PRODUCTS_DIR}/video_player/video_player.framework", + "${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework", + "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", ); - name = "Thin Binary"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AADraggableView.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MTBBarcodeScanner.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OrderedSet.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Try.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/barcode_scan2.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -296,7 +375,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 986D76F6694E0D6D8C5CDAAB /* [CP] Check Pods Manifest.lock */ = { + C79BE4619064E868C0DFBD12 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -423,7 +502,10 @@ ); INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -558,7 +640,10 @@ ); INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -589,7 +674,10 @@ ); INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index bfbb2561..c87d15a3 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { : widget.model.medicalReportTemplate[0].templateText.length > 0 ? widget.model.medicalReportTemplate[0].templateText : ""), + controller: _controller, hint: "Write the medical report ", height: MediaQuery.of(context).size.height * 0.75, ), From d9d2e40927c3c43adab1fef0d0c35e2652a8c687 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 29 Dec 2021 17:01:30 +0200 Subject: [PATCH 08/11] we fix some issues in pharmacies_items_request_model, refer-patient-screen and refer-patient-screen-in-patient --- .../pharmacies_items_request_model.dart | 2 ++ .../referral/refer-patient-screen-in-patient.dart | 10 ++++------ .../profile/referral/refer-patient-screen.dart | 15 +++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index e81ce9b3..a09736e2 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -59,6 +59,8 @@ class PharmaciesItemsRequestModel { data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; + //TODO Elham* fix it later + data['VersionID'] = 40; return data; } } diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 41686ead..554a4209 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -261,8 +261,7 @@ class _PatientMakeInPatientReferralScreenState attributeName: 'facilityName', attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; @@ -278,7 +277,6 @@ class _PatientMakeInPatientReferralScreenState DrAppToastMsg.showErrorToast( model.error); } - }); }, ); showDialog( @@ -316,8 +314,8 @@ class _PatientMakeInPatientReferralScreenState TranslationBase.of(context) .clinicSearch, okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedDoctor = null; _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog( @@ -334,7 +332,7 @@ class _PatientMakeInPatientReferralScreenState DrAppToastMsg.showErrorToast( model.error); } - }); + }, ); showDialog( diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index e9ba4770..40325374 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -174,7 +174,7 @@ class _PatientMakeReferralScreenState extends State { fontWeight: FontWeight.w700, color: HexColor("#359846"), onPressed: () async { - setState(() async { + await locator().logEvent( eventCategory: "Refer Patient", eventAction: "Submit Refer", @@ -203,7 +203,7 @@ class _PatientMakeReferralScreenState extends State { } else { doctorError = null; } - }); + if (appointmentDate == null || _selectedBranch == null || _selectedClinic == null || @@ -309,8 +309,8 @@ class _PatientMakeReferralScreenState extends State { attributeName: 'facilityName', attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; @@ -322,7 +322,7 @@ class _PatientMakeReferralScreenState extends State { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } - }); + }, ); showDialog( @@ -358,8 +358,8 @@ class _PatientMakeReferralScreenState extends State { usingSearch: true, hintSearchText: TranslationBase.of(context).clinicSearch, okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedDoctor = null; _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog(context); @@ -373,7 +373,6 @@ class _PatientMakeReferralScreenState extends State { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } - }); }, ); showDialog( From bfeb1ac047a0b5cae7a9576afeee117428ef5c72 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Thu, 30 Dec 2021 15:41:21 +0200 Subject: [PATCH 09/11] Fixed some issues in patient_sick_leave_screen and vital_sing_chart_blood_pressure --- .../patient_sick_leave_screen.dart | 172 +++++++++--------- .../vital_sing_chart_blood_pressure.dart | 8 +- 2 files changed, 91 insertions(+), 89 deletions(-) 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 51c5b35b..1064036f 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -167,93 +167,95 @@ class PatientSickLeaveScreen extends StatelessWidget { SizedBox( width: 10, ), - Column( - children: [ - CustomRow( - label: TranslationBase.of( - context) - .daysSickleave , - labelSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.3, - valueSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 4, - value: (item.sickLeaveDays - .toString() != - null && - item.sickLeaveDays - .toString() != - "null") - ? item.sickLeaveDays - .toString() - : item.noOfDays - .toString(), - ), - CustomRow( - label: TranslationBase.of( - context) - .startDate + - ' ' ?? - "", - labelSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.3, - valueSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 4, - value: AppDateUtils - .getDayMonthYearDateFormatted( - item.startDate.contains( - "/Date(") - ? AppDateUtils - .convertStringToDate( - item - .startDate) - : DateTime.parse( - item.startDate), + Expanded( + child: Column( + children: [ + CustomRow( + label: TranslationBase.of( + context) + .daysSickleave , + labelSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.3, + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + value: (item.sickLeaveDays + .toString() != + null && + item.sickLeaveDays + .toString() != + "null") + ? item.sickLeaveDays + .toString() + : item.noOfDays + .toString(), ), - ), - CustomRow( - label: TranslationBase.of( - context) - .endDate + - ' ' ?? - "", - labelSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.3, - valueSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 4, - value: AppDateUtils - .getDayMonthYearDateFormatted( - item.startDate.contains( - "/Date(") - ? AppDateUtils - .convertStringToDate( - item.endDate ?? - "") - .add( - Duration( - days: item - .noOfDays ?? - item.sickLeaveDays), - ) - : DateTime.parse( - item.startDate ?? - "") - .add( - Duration( - days: - item.noOfDays ?? - ""), - ), + CustomRow( + label: TranslationBase.of( + context) + .startDate + + ' ' ?? + "", + labelSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.3, + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + value: AppDateUtils + .getDayMonthYearDateFormatted( + item.startDate.contains( + "/Date(") + ? AppDateUtils + .convertStringToDate( + item + .startDate) + : DateTime.parse( + item.startDate), + ), ), - ), - ], - crossAxisAlignment: - CrossAxisAlignment.start, + CustomRow( + label: TranslationBase.of( + context) + .endDate + + ' ' ?? + "", + labelSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.3, + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + value: AppDateUtils + .getDayMonthYearDateFormatted( + item.startDate.contains( + "/Date(") + ? AppDateUtils + .convertStringToDate( + item.endDate ?? + "") + .add( + Duration( + days: item + .noOfDays ?? + item.sickLeaveDays), + ) + : DateTime.parse( + item.startDate ?? + "") + .add( + Duration( + days: + item.noOfDays ?? + ""), + ), + ), + ), + ], + crossAxisAlignment: + CrossAxisAlignment.start, + ), ), ], ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index d0416539..0910c1c1 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -117,20 +117,20 @@ class VitalSingChartBloodPressure extends StatelessWidget { (element) { DateTime elementDate = AppDateUtils.getDateTimeFromServerFormat(element.createdOn); - if (element.toJson()[viewKey1]?.toInt() != 0) + if (element.toJson()[viewKey1]?.toInt() != 0 && element.toJson()[viewKey1]?.toInt() != null) timeSeriesData1.add( TimeSeriesSales2( new DateTime( elementDate.year, elementDate.month, elementDate.day), - element.toJson()[viewKey1].toDouble(), + element.toJson()[viewKey1]?.toDouble(), ), ); - if (element.toJson()[viewKey2]?.toInt() != 0) + if (element.toJson()[viewKey2]?.toInt() != 0 && element.toJson()[viewKey2]?.toInt() != null) timeSeriesData2.add( TimeSeriesSales2( new DateTime( elementDate.year, elementDate.month, elementDate.day), - element.toJson()[viewKey2].toDouble(), + element.toJson()[viewKey2]?.toDouble(), ), ); }, From 746c2fdddbda95e6d2d7f72bbbf2566737ae65db Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 2 Jan 2022 10:07:25 +0200 Subject: [PATCH 10/11] fixed some issues in localized_values and out_patient_screen --- lib/config/localized_values.dart | 2 +- lib/screens/patients/out_patient/out_patient_screen.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 09562b9f..b56b6aa9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -56,7 +56,7 @@ const Map> localizedValues = { "myInPatient": {"en": "My\n In Patients", "ar": "مرضاي\nالمنومين"}, "myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"}, "inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"}, - "inPatientAll": {"en": "All Patients", "ar": "جميع المرضى المنومين"}, + "inPatientAll": {"en": "All Patients", "ar": "المرضى المنومين"}, "operations": {"en": "Operations", "ar": "عمليات"}, "patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"}, "searchMedicineDashboard": { diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index b59824b0..39514817 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -100,7 +100,7 @@ class _OutPatientsScreenState extends State { appBarTitle: "Search Patient", isShowAppBar: true, appBar: PatientSearchHeader( - title: "My Out patient", + title: TranslationBase.of(context).myOutPatient, ), baseViewModel: model, body: Column( From 0901a2e39c522844edb510e4cb577baa1948de2f Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 2 Jan 2022 12:12:26 +0200 Subject: [PATCH 11/11] fixed some issues in localized_values and progress_note_screen --- lib/config/localized_values.dart | 2 +- .../patients/profile/notes/note/progress_note_screen.dart | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index b56b6aa9..6bdf66fe 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -708,7 +708,7 @@ const Map> localizedValues = { "icd": {"en": "ICD", "ar": "التصنيف الدولي للأمراض"}, "days": {"en": "Days", "ar": "أيام"}, "months": {"en": "Months", "ar": "أشهر"}, - "years": {"en": "Years", "ar": "سنوات"}, + "years": {"en": "Years", "ar": "سنة"}, "hr": {"en": "Hr", "ar": "س"}, "min": {"en": "Min", "ar": "د"}, "appointmentNumber": {"en": "Appointment Number", "ar": "رقم الموعد"}, diff --git a/lib/screens/patients/profile/notes/note/progress_note_screen.dart b/lib/screens/patients/profile/notes/note/progress_note_screen.dart index f47c99ae..bf19ae6e 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -22,6 +22,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/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -92,8 +93,9 @@ class _ProgressNoteState extends State { ), body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoProgressNote) + ? widget.visitType == 3 + ? ErrorMessage(error: TranslationBase.of(context).errorNoOrders,) + : ErrorMessage(error: TranslationBase.of(context).errorNoProgressNote,) : Container( color: Colors.grey[200], child: Column(