From 6c6b0435718475fd98df9db43f3951887a38d99e Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 23 Jun 2021 13:46:33 +0300 Subject: [PATCH] flutter 2 migration fix --- .../patient_search/patient_search_result_screen.dart | 10 +++++----- lib/screens/prescription/add_prescription_form.dart | 7 +------ .../profile/profile_medical_info_widget_search.dart | 1 - 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/screens/patients/patient_search/patient_search_result_screen.dart b/lib/screens/patients/patient_search/patient_search_result_screen.dart index 39b619c0..956c0d93 100644 --- a/lib/screens/patients/patient_search/patient_search_result_screen.dart +++ b/lib/screens/patients/patient_search/patient_search_result_screen.dart @@ -46,10 +46,10 @@ class _PatientsSearchResultScreenState extends State late int clinicId; late AuthenticationViewModel authenticationViewModel; - late String patientType; - late String patientTypeTitle; + String? patientType; + String? patientTypeTitle; var selectedFilter = 1; - late String arrivalType; + String? arrivalType; late ProjectViewModel projectsProvider; var isView; final _controller = TextEditingController(); @@ -131,8 +131,8 @@ class _PatientsSearchResultScreenState extends State padding: EdgeInsets.all(8.0), child: PatientCard( patientInfo: model.filterData[index], - patientType: patientType, - arrivalType: arrivalType, + patientType: patientType ?? "", + arrivalType: arrivalType ?? "", isFromSearch: widget.isSearchAndOut, isInpatient: widget.isInpatient, onTap: () { diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 7fbefeb0..d0909a0d 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -8,7 +8,6 @@ import 'package:doctor_app_flutter/core/model/search_drug/get_medication_respons import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_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/models/SOAP/GetAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; @@ -31,7 +30,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; @@ -603,10 +601,7 @@ class _PrescriptionFormWidgetState extends State { child: AppTextFieldCustom( hintText: TranslationBase.of(context).boxQuantity, isTextFieldHasSuffix: false, - dropDownText: box != null - ? TranslationBase.of(context).boxQuantity ?? - "" + ": " + model.boxQuintity.toString() - : null, + dropDownText: box != null ? model.boxQuintity.toString() : null, enabled: false, ), ), diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart index 3e457a8d..2cf57c01 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -4,7 +4,6 @@ import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart';