Null Safety Fixes

update_flutter_3.16.0_voipcall
Aamir Muhammad 2 years ago
parent 3b2ee0ef65
commit e1604b09f8

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_model.dart'; import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_model.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_request.dart'; import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_request.dart';
@ -185,7 +183,6 @@ class LabsService extends BaseService {
await baseAppClient.postPatient(GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION, patient: patient, onSuccess: (dynamic response, int statusCode) { await baseAppClient.postPatient(GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION, patient: patient, onSuccess: (dynamic response, int statusCode) {
labOrdersResultHistoryList.clear(); labOrdersResultHistoryList.clear();
response['ListGeneralResultHistory'].forEach((lab) { response['ListGeneralResultHistory'].forEach((lab) {
print(jsonEncode(lab));
labOrdersResultHistoryList.add(LabResultHistory.fromJson(lab)); labOrdersResultHistoryList.add(LabResultHistory.fromJson(lab));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {

@ -140,8 +140,9 @@ class SOAPViewModel extends BaseViewModel {
Future getMasterLookup(MasterKeysService masterKeys, {bool isBusyLocal = false, String searchKey = ""}) async { Future getMasterLookup(MasterKeysService masterKeys, {bool isBusyLocal = false, String searchKey = ""}) async {
if (isBusyLocal) { if (isBusyLocal) {
setState(ViewState.Busy); setState(ViewState.Busy);
} else } else {
setState(ViewState.Busy); setState(ViewState.Busy);
}
await _SOAPService.getMasterLookup(masterKeys, searchKey: searchKey); await _SOAPService.getMasterLookup(masterKeys, searchKey: searchKey);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
@ -255,9 +256,7 @@ class SOAPViewModel extends BaseViewModel {
return allergiesString; return allergiesString;
} }
Future getPatientPhysicalExam( Future getPatientPhysicalExam(PatiantInformtion patientInfo, {required bool allowSetState}) async {
PatiantInformtion patientInfo,
) async {
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel( GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel(
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo == null ? "0" : patientInfo.episodeNo.toString(), episodeID: patientInfo.episodeNo == null ? "0" : patientInfo.episodeNo.toString(),
@ -271,13 +270,12 @@ class SOAPViewModel extends BaseViewModel {
getPhysicalExamReqModel.admissionNo = int.parse(patientInfo.admissionNo!); getPhysicalExamReqModel.admissionNo = int.parse(patientInfo.admissionNo!);
else else
getPhysicalExamReqModel.admissionNo = 0; getPhysicalExamReqModel.admissionNo = 0;
setState(ViewState.Busy); if (allowSetState) setState(ViewState.Busy);
await _SOAPService.getPatientPhysicalExam(getPhysicalExamReqModel); await _SOAPService.getPatientPhysicalExam(getPhysicalExamReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.Error); if (allowSetState) setState(ViewState.Error);
} else } else if (allowSetState) setState(ViewState.Idle);
setState(ViewState.Idle);
} }
Future getPatientProgressNote(GetProgressNoteReqModel getGetProgressNoteReqModel) async { Future getPatientProgressNote(GetProgressNoteReqModel getGetProgressNoteReqModel) async {

@ -80,7 +80,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier! * (SizeConfig.isHeightVeryShort ? 3 : 4), height: SizeConfig.heightMultiplier! * (SizeConfig.isHeightVeryShort ? 3 : 4),
), ),
authenticationViewModel.user != null && isMoreOption == false authenticationViewModel.user != null && authenticationViewModel.user!.logInTypeID != null && isMoreOption == false
? Column( ? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -238,7 +238,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
]), ]),
authenticationViewModel.user != null && isMoreOption == false authenticationViewModel.user != null && authenticationViewModel.user!.logInTypeID != null && isMoreOption == false
? Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ ? Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Expanded( Expanded(
@ -416,7 +416,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
} }
sendActivationCode(AuthMethodTypes authMethodType) async { sendActivationCode(AuthMethodTypes authMethodType) async {
if (authenticationViewModel.user != null) { if (authenticationViewModel.user != null && authenticationViewModel.user!.logInTypeID != null) {
sendActivationCodeVerificationScreen(authMethodType); sendActivationCodeVerificationScreen(authMethodType);
} else { } else {
sendActivationCodeByOtpNotificationType(authMethodType); sendActivationCodeByOtpNotificationType(authMethodType);

@ -26,8 +26,7 @@ class LabResultHistoryChartAndDetails extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 8), margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(12)),
color: Colors.white, borderRadius: BorderRadius.circular(12)),
child: LineChartCurvedLabHistory( child: LineChartCurvedLabHistory(
title: name, title: name,
labResultHistory: labResultHistory, labResultHistory: labResultHistory,
@ -36,8 +35,7 @@ class LabResultHistoryChartAndDetails extends StatelessWidget {
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(12)),
color: Colors.white, borderRadius: BorderRadius.circular(12)),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

@ -60,7 +60,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
model.setObjectiveCallBack(this); model.setObjectiveCallBack(this);
mySelectedExamination.clear(); mySelectedExamination.clear();
model.isAddExamInProgress = true; model.isAddExamInProgress = true;
await model.getPatientPhysicalExam(widget.patientInfo); await model.getPatientPhysicalExam(widget.patientInfo, allowSetState: false);
if (model.patientPhysicalExamList.isNotEmpty) { if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) { if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination); await model.getMasterLookup(MasterKeysService.PhysicalExamination);

@ -272,6 +272,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
@override @override
Function nextFunction(model) { Function nextFunction(model) {
return addSubjectiveInfo(model: model, myAllergiesList: myAllergiesList.where((i) => i.isChecked).toList(), myHistoryList: myHistoryList); addSubjectiveInfo(model: model, myAllergiesList: myAllergiesList.where((i) => i.isChecked).toList(), myHistoryList: myHistoryList);
return () {};
} }
} }

@ -26,7 +26,7 @@ class NewPrescriptionsPage extends StatelessWidget {
bool isFromLiveCare = routeArgs['isFromLiveCare']; bool isFromLiveCare = routeArgs['isFromLiveCare'];
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.getPrescriptionListNew(mrn: patient.patientMRN, appNo: patient.appointmentNo ?? 0); model.getPrescriptionListNew(mrn: patient.patientMRN, appNo: patient.appointmentNo);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,

Loading…
Cancel
Save