5 step from fix screen

merge-requests/896/head
Elham Rababh 4 years ago
parent 7d835ee280
commit a54ec0ef78

@ -142,10 +142,8 @@ class PatientRegistrationViewModel extends BaseViewModel {
}
Future sendActivationCodeByOTPNotificationType(
{required SendActivationCodeByOTPNotificationTypeForRegistrationModel
registrationModel,
required int otpType,
required PatientRegistrationViewModel user}) async {
{
required int otpType}) async {
setState(ViewState.BusyLocal);
print(checkPatientForRegistrationModel);
print(checkPatientForRegistrationModel);

@ -1,13 +1,13 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAllergy {
MasterKeyModel selectedAllergySeverity;
MasterKeyModel selectedAllergy;
String remark;
bool isChecked;
MasterKeyModel? selectedAllergySeverity;
MasterKeyModel? selectedAllergy;
String? remark;
bool? isChecked;
bool isExpanded;
bool isLocal;
int createdBy;
int ?createdBy;
bool hasValidationError;
MySelectedAllergy(

@ -1,16 +1,16 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAssessment {
MasterKeyModel selectedICD;
MasterKeyModel selectedDiagnosisCondition;
MasterKeyModel selectedDiagnosisType;
String remark;
int appointmentId;
int createdBy;
String createdOn;
int doctorID;
String doctorName;
String icdCode10ID;
MasterKeyModel? selectedICD;
MasterKeyModel? selectedDiagnosisCondition;
MasterKeyModel? selectedDiagnosisType;
String? remark;
int? appointmentId;
int? createdBy;
String? createdOn;
int? doctorID;
String? doctorName;
String? icdCode10ID;
MySelectedAssessment(
{this.selectedICD,

@ -74,7 +74,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
iconSize: 20, onPressed: () { },
),
),
SizedBox(
@ -170,14 +170,14 @@ class _DischargedPatientState extends State<DischargedPatient> {
? model
.filterData[
index]
.nationalityName
.nationalityName!
.trim()
: model.filterData[index].nationality !=
null
? model
.filterData[
index]
.nationality
.nationality!
.trim()
: model.filterData[index].nationalityId !=
null
@ -203,16 +203,16 @@ class _DischargedPatientState extends State<DischargedPatient> {
.network(
model.filterData[index].nationalityFlagURL !=
null
? model.filterData[index].nationalityFlagURL
? model.filterData[index].nationalityFlagURL!
: '',
height:
25,
width:
30,
errorBuilder: (BuildContext context,
Object
errorBuilder: (BuildContext? context,
Object?
exception,
StackTrace
StackTrace?
stackTrace) {
return AppText(
'',
@ -320,7 +320,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
text: model.filterData[index].admissionDate ==
null
? ""
: TranslationBase.of(context).admissionDate +
: TranslationBase.of(context).admissionDate! +
" : ",
style: TextStyle(
fontSize:
@ -385,7 +385,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
.w300,
),
AppText(
"${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}",
"${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate!)).inDays + 1}",
fontSize:
15,
fontWeight:

@ -9,88 +9,85 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d
import 'package:flutter/material.dart';
class PendingOrdersScreen extends StatelessWidget {
const PendingOrdersScreen({Key key}) : super(key: key);
const PendingOrdersScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<PendingOrdersViewModel>(
onModelReady: (model) => model.getPendingOrders(
patientId: patient.patientMRN,
admissionNo: int.parse(patient.admissionNo)),
builder:
(BuildContext context, PendingOrdersViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
isShowAppBar: true,
baseViewModel: model,
appBarTitle: "Pending Orders",
body: model.pendingOrdersList == null ||
onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold(
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
isShowAppBar: true,
baseViewModel: model,
appBarTitle: "Pending Orders",
body: model.pendingOrdersList == null ||
model.pendingOrdersList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).noDataAvailable)
: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).pending,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).orders,
fontSize: 25.0,
fontWeight: FontWeight.w700,
),
],
),
],
? DrAppEmbeddedError(
error: TranslationBase.of(context).noDataAvailable!)
: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).pending,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).orders,
fontSize: 25.0,
fontWeight: FontWeight.w700,
),
],
),
],
),
),
),
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.pendingOrdersList.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.pendingOrdersList.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Color(0xFF707070), width: 0.30),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: AppText(
model.pendingOrdersList[index].notes),
),
border: Border.all(
color: Color(0xFF707070), width: 0.30),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: AppText(
model.pendingOrdersList[index].notes),
),
),
);
})),
],
),
),
);
})),
],
),
),
);
}
}

@ -70,7 +70,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
_tabController.dispose();
super.dispose();
if (isFromLiveCare) {
_liveCareViewModel.removePatientFromDoctorList(patient.vcId);
_liveCareViewModel.removePatientFromDoctorList(patient.vcId!);
}
}
@ -139,7 +139,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
return BaseView<LiveCarePatientViewModel>(
onModelReady: (model) async {
if (isFromLiveCare && patient.patientStatus == 1)
await model.addPatientToDoctorList(patient.vcId);
await model.addPatientToDoctorList(patient!.vcId!);
},builder: (_, model, w) => AppScaffold(
baseViewModel: model,isLoading: true,
appBarTitle: TranslationBase.of(context).patientProfile ?? "",
@ -151,6 +151,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
Column(
children: [
PatientProfileAppBar(
patient,
patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient,
videoCallDurationStream: videoCallDurationStream,
@ -364,7 +365,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
} else {
GifLoaderDialogUtils.showMyDialog(context);
await model.startCall(
isReCall: false, vCID: patient.vcId);
isReCall: false, vCID: patient.vcId!);
if (model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
@ -398,7 +399,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
: true,
callConnected,
callDisconnected);
});
}, type: '');
}
}
},
@ -417,16 +418,16 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
);
}
createEpisode({PatiantInformtion patient, SOAPViewModel model}) async {
createEpisode({required PatiantInformtion patient, required SOAPViewModel model}) async {
await locator<AnalyticsService>().logEvent(
eventCategory: "Patient Profile",
eventAction: "Create Episode",
);
GifLoaderDialogUtils.showMyDialog(context);
if (patient.admissionNo != null && patient.admissionNo.isNotEmpty) {
if (patient.admissionNo != null && patient.admissionNo!.isNotEmpty) {
PostEpisodeForInpatientRequestModel postEpisodeReqModel =
PostEpisodeForInpatientRequestModel(
admissionNo: int.parse(patient.admissionNo),
admissionNo: int.parse(patient!.admissionNo!),
patientID: patient.patientId);
await model.postEpisodeForInPatient(postEpisodeReqModel);
} else {

@ -42,8 +42,8 @@ class ProfileGridForInPatient extends StatelessWidget {
LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).special,
TranslationBase.of(context).lab!,
TranslationBase.of(context).special!,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),

@ -38,13 +38,13 @@ class ProfileGridForOther extends StatelessWidget {
PatientProfileCardModel(
TranslationBase.of(context).lab!, TranslationBase.of(context).result!, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
PatientProfileCardModel(TranslationBase.of(context).lab!, TranslationBase.of(context).special!,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,
PatientProfileCardModel(TranslationBase.of(context).radiology!, TranslationBase.of(context).service!,
RADIOLOGY_PATIENT, 'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription,
PatientProfileCardModel(TranslationBase.of(context).orders!, TranslationBase.of(context).prescription!,
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health!, TranslationBase.of(context).summary!, HEALTH_SUMMARY,

@ -35,13 +35,13 @@ class ProfileGridForSearch extends StatelessWidget {
PatientProfileCardModel(
TranslationBase.of(context).lab!, TranslationBase.of(context).result!, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
PatientProfileCardModel(TranslationBase.of(context).lab!, TranslationBase.of(context).special!,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,
PatientProfileCardModel(TranslationBase.of(context).radiology!, TranslationBase.of(context).service!,
RADIOLOGY_PATIENT, 'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription,
PatientProfileCardModel(TranslationBase.of(context).orders!, TranslationBase.of(context).prescription!,
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health!, TranslationBase.of(context).summary!, HEALTH_SUMMARY,

@ -16,7 +16,7 @@ import 'package:flutter/material.dart';
// ignore: must_be_immutable
class MyReferralDetailScreen extends StatelessWidget {
final MyReferralPatientModel referralPatient;
final MyReferralPatientModel? referralPatient;
const MyReferralDetailScreen({Key? key, this.referralPatient}) : super(key: key);
@ -29,7 +29,7 @@ class MyReferralDetailScreen extends StatelessWidget {
onModelReady: (model) => model.getDoctorProfile(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
appBarTitle: TranslationBase.of(context).referPatient!,
isShowAppBar: false,
body: Column(
children: [
@ -53,13 +53,13 @@ class MyReferralDetailScreen extends StatelessWidget {
),
Expanded(
child: AppText(
(Helpers.capitalize(referralPatient.firstName + " " + referralPatient.lastName)),
(Helpers.capitalize(referralPatient!.firstName! + " " + referralPatient!.lastName!)),
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
),
),
referralPatient.gender == 1
referralPatient!.gender! == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
@ -79,7 +79,7 @@ class MyReferralDetailScreen extends StatelessWidget {
width: 60,
height: 60,
child: Image.asset(
referralPatient.gender == 1
referralPatient!.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
@ -96,20 +96,20 @@ class MyReferralDetailScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
referralPatient.referralStatus != null
? model.getReferralStatusNameByCode(referralPatient.referralStatus, context)
referralPatient!.referralStatus != null
? model.getReferralStatusNameByCode(referralPatient!.referralStatus!, context)
: "",
fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: referralPatient.referralStatus == 1
color: referralPatient!.referralStatus == 1
? Color(0xffc4aa54)
: referralPatient.referralStatus == 46 || referralPatient.referralStatus == 2
: referralPatient!.referralStatus == 46 || referralPatient!.referralStatus! == 2
? Colors.green[700]
: Colors.red[700],
),
AppText(
AppDateUtils.getDayMonthYearDateFormatted(referralPatient.referralDate),
AppDateUtils.getDayMonthYearDateFormatted(referralPatient!.referralDate!),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier,
@ -131,7 +131,7 @@ class MyReferralDetailScreen extends StatelessWidget {
color: Color(0XFF575757),
),
AppText(
"${referralPatient.patientID}",
"${referralPatient!.patientID}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
@ -140,7 +140,7 @@ class MyReferralDetailScreen extends StatelessWidget {
],
),
AppText(
AppDateUtils.getTimeHHMMA(referralPatient.referralDate),
AppDateUtils.getTimeHHMMA(referralPatient!.referralDate!),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier,
@ -166,7 +166,7 @@ class MyReferralDetailScreen extends StatelessWidget {
color: Color(0XFF575757),
),
AppText(
referralPatient.targetProjectId == referralPatient.sourceProjectId
referralPatient!.targetProjectId! == referralPatient!.sourceProjectId!
? TranslationBase.of(context).sameBranch
: TranslationBase.of(context).otherBranch,
fontFamily: 'Poppins',
@ -181,7 +181,7 @@ class MyReferralDetailScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).remarks + " : ",
TranslationBase.of(context).remarks! + " : ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
@ -189,7 +189,7 @@ class MyReferralDetailScreen extends StatelessWidget {
),
Expanded(
child: AppText(
referralPatient.referringDoctorRemarks ?? '',
referralPatient!.referringDoctorRemarks ?? '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
@ -204,22 +204,22 @@ class MyReferralDetailScreen extends StatelessWidget {
Row(
children: [
AppText(
referralPatient.nationalityName != null
? referralPatient.nationalityName
referralPatient!.nationalityName != null
? referralPatient!.nationalityName
: "",
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
fontSize: 1.4 * SizeConfig.textMultiplier,
),
referralPatient.nationalityFlagURL != null
referralPatient!.nationalityFlagURL != null
? ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
referralPatient.nationalityFlagURL,
referralPatient!.nationalityFlagURL!,
height: 25,
width: 30,
errorBuilder:
(BuildContext context, Object exception, StackTrace stackTrace) {
(BuildContext ?context, Object ?exception, StackTrace? stackTrace) {
return Text('No Image');
},
))
@ -247,7 +247,7 @@ class MyReferralDetailScreen extends StatelessWidget {
height: 40,
child: CircleAvatar(
radius: 25.0,
backgroundImage: NetworkImage(referralPatient.doctorImageURL),
backgroundImage: NetworkImage(referralPatient!.doctorImageURL!),
backgroundColor: Colors.transparent,
),
),
@ -259,7 +259,7 @@ class MyReferralDetailScreen extends StatelessWidget {
child: Column(
children: [
AppText(
referralPatient.doctorName,
referralPatient!.doctorName,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.7 * SizeConfig.textMultiplier,
@ -293,7 +293,7 @@ class MyReferralDetailScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16),
child: SizedBox(
child: ProfileMedicalInfoWidgetSearch(
patient: model.getPatientFromReferralO(referralPatient),
patient: model.getPatientFromReferralO(referralPatient!),
patientType: "7",
isInpatient: false,
from: null,
@ -306,7 +306,7 @@ class MyReferralDetailScreen extends StatelessWidget {
),
),
),
if (referralPatient.referralStatus == 1)
if (referralPatient!.referralStatus == 1)
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row(
@ -321,7 +321,7 @@ class MyReferralDetailScreen extends StatelessWidget {
vPadding: 12,
disabled: model.state == ViewState.Busy,
onPressed: () async {
await model.responseReferral(referralPatient, true);
await model.responseReferral(referralPatient!, true);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
@ -346,7 +346,7 @@ class MyReferralDetailScreen extends StatelessWidget {
vPadding: 12,
disabled: model.state == ViewState.Busy,
onPressed: () async {
await model.responseReferral(referralPatient, false);
await model.responseReferral(referralPatient!, false);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {

@ -115,7 +115,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
baseViewModel: model,
isShowAppBar: true,
appBar: BottomSheetTitle(
title: TranslationBase.of(context).addAssessmentDetails),
title: TranslationBase.of(context).addAssessmentDetails!),
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
@ -210,9 +210,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
.width * 0.7,
child: AppText(
widget.mySelectedAssessment
.selectedICD.description +
.selectedICD!.description! +
(' (${widget.mySelectedAssessment
.selectedICD.code} )'),
.selectedICD!.code!} )'),
color: Color(0xFF575757),
fontSize: 10,
fontWeight: FontWeight.w700,

@ -165,7 +165,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
),
new TextSpan(
text: assessment
.selectedICD.code
.selectedICD!.code
.trim()
.toUpperCase() ??
""),
@ -191,7 +191,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
children: <TextSpan>[
new TextSpan(
text: assessment
.selectedICD.description
.selectedICD!.description
.toString(),
),
],
@ -249,7 +249,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
new TextSpan(
text: TranslationBase.of(
context)
.condition +
.condition! +
" : ",
style: new TextStyle(
letterSpacing: -0.4,
@ -260,11 +260,11 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
text: projectViewModel
.isArabic
? assessment
.selectedDiagnosisCondition
.nameAr
.selectedDiagnosisCondition!
.nameAr!
: assessment
.selectedDiagnosisCondition
.nameEn,
.selectedDiagnosisCondition!
.nameEn!,
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
@ -289,7 +289,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
new TextSpan(
text: TranslationBase.of(
context)
.dType +
.dType! +
' : ',
style: new TextStyle(
letterSpacing: -0.4,
@ -300,10 +300,10 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
text: projectViewModel
.isArabic
? assessment
.selectedDiagnosisType
.selectedDiagnosisType!
.nameAr
: assessment
.selectedDiagnosisType
.selectedDiagnosisType!
.nameEn,
style: new TextStyle(
fontSize: SizeConfig
@ -331,7 +331,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
new TextSpan(
text: TranslationBase.of(
context)
.doctor +
.doctor! +
' : ',
style: new TextStyle(
fontSize: SizeConfig
@ -374,7 +374,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
'')
? TranslationBase.of(
context)
.remarks +
.remarks! +
" : "
: '',
fontSize: SizeConfig
@ -405,8 +405,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
? AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.parse(
assessment
.createdOn))
assessment!
.createdOn!))
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now()),
@ -419,8 +419,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
assessment.createdOn != null
? AppDateUtils.getHour(
DateTime.parse(
assessment
.createdOn))
assessment!
.createdOn!))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,

@ -39,10 +39,10 @@ class RegisterSearchPatientPage extends StatefulWidget {
}
class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
String countryError;
late String countryError;
dynamic _selectedCountry;
List<dynamic> countryList;
late List<dynamic> countryList;
dynamic country;
@ -52,14 +52,14 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
TextEditingController(text: "508079569");
TextEditingController _phoneCode = TextEditingController(text: "966");
String phoneError;
late String phoneError;
TextEditingController _idController =
TextEditingController(text: "1062938285");
String idError;
late String idError;
DateTime _birthDateInGregorian;
String birthdateError;
late DateTime _birthDateInGregorian;
late String birthdateError;
var birthDateInHijri = new HijriCalendar.now();
CalenderType calenderType = CalenderType.Gregorian;

@ -16,7 +16,7 @@ class ActivationPage extends StatefulWidget {
final PatientRegistrationViewModel model;
final Function changePageViewIndex;
ActivationPage({this.model, this.changePageViewIndex});
ActivationPage({required this.model, required this.changePageViewIndex});
@override
_ActivationPageState createState() => _ActivationPageState();
@ -393,7 +393,7 @@ class _ActivationPageState extends State<ActivationPage> {
children: [
AppText(
TranslationBase.of(context)
.validationMessage +
.validationMessage! +
' ',
fontWeight: FontWeight.w600,
fontSize: 14,
@ -481,7 +481,6 @@ class _ActivationPageState extends State<ActivationPage> {
sendActivationCode(type) async {
GifLoaderDialogUtils.showMyDialog(context);
await widget.model.sendActivationCodeByOTPNotificationType(otpType: type);
if (widget.model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.model.error);
GifLoaderDialogUtils.hideDialog(context);

@ -426,7 +426,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
element: model.itemMedicineListUnit.length == 1
? model.itemMedicineListUnit[0]
: units,
elementError: unitError,
elementError: unitError!,
keyName: 'description',
keyId: 'parameterCode',
hintText: 'Select',
@ -448,7 +448,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
element: model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]
: route,
elementError: routeError,
elementError: routeError!,
keyId: 'parameterCode',
keyName: 'description',
okFunction: (selectedValue) {

@ -37,9 +37,9 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
TextEditingController _toDateController = new TextEditingController();
TextEditingController _toDateController2 = new TextEditingController();
ProjectViewModel projectsProvider;
SickLeaveViewModel sickLeaveViewModel;
String _selectedClinic;
late ProjectViewModel projectsProvider;
late SickLeaveViewModel sickLeaveViewModel;
late String _selectedClinic;
Map profile = {};
var offTime = '1';
var date;
@ -48,8 +48,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
dynamic fromDate;
dynamic toDate;
var clinicID;
String fromTime;
String toTime;
late String fromTime;
late String toTime;
TextEditingController _controller4 = new TextEditingController();
TextEditingController _controller5 = new TextEditingController();
void _presentDatePicker(id) {
@ -119,7 +119,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child: AppScaffold(
baseViewModel: model2,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).rescheduleLeaves,
appBarTitle: TranslationBase.of(context).rescheduleLeaves!,
body: Center(
child: Container(
margin: EdgeInsets.only(top: 10),
@ -127,121 +127,6 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
widthFactor: 0.9,
child: ListView(
children: [
// Container(
// margin: EdgeInsets.all(8),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(
// Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// width: double.infinity,
// child: Padding(
// padding: EdgeInsets.only(
// top: SizeConfig.widthMultiplier * 0.9,
// bottom:
// SizeConfig.widthMultiplier * 0.9,
// right: SizeConfig.widthMultiplier * 3,
// left: SizeConfig.widthMultiplier * 3),
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// mainAxisSize: MainAxisSize.max,
// children: <Widget>[
// Expanded(
// // add Expanded to have your dropdown button fill remaining space
// child:
// DropdownButtonHideUnderline(
// child: new IgnorePointer(
// ignoring: true,
// child: DropdownButton(
// focusColor:
// Colors.grey,
// isExpanded: true,
// dropdownColor:
// Colors.grey,
// value: getClinicName(
// model) ??
// "",
// iconSize: 0,
// elevation: 16,
// selectedItemBuilder:
// (BuildContext
// context) {
// return model
// .getClinicNameList()
// .map((item) {
// return Row(
// mainAxisSize:
// MainAxisSize
// .max,
// children: <
// Widget>[
// AppText(
// item,
// fontSize:
// SizeConfig.textMultiplier *
// 2.1,
// color: Colors
// .grey[
// 500],
// ),
// ],
// );
// }).toList();
// },
// onChanged:
// (newValue) =>
// {},
// items: model
// .getClinicNameList()
// .map((item) {
// return DropdownMenuItem(
// value: item
// .toString(),
// child: Text(
// item,
// textAlign:
// TextAlign
// .end,
// ),
// );
// }).toList(),
// ))),
// ),
// ],
// )
// ],
// ),
// )),
// Container(
// margin: EdgeInsets.all(8),
// decoration: BoxDecoration(
// borderRadius:
// BorderRadius.all(Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// padding: EdgeInsets.all(5),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// new IgnorePointer(
// ignoring: true,
// child: AppTextFormField(
// readOnly: true,
// hintText: profile != null
// ? profile['DoctorName']
// : "",
// borderColor: Colors.white,
// onSaved: (value) {},
// inputFormatter: ONLY_NUMBERS))
// ],
// ),
// ),
Container(
margin: EdgeInsets.all(8),
@ -334,7 +219,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
AppTextFormField(
hintText: TranslationBase.of(context).fromDate,
borderColor: Colors.white,
prefix: IconButton(icon: Icon(Icons.calendar_today)),
prefix: IconButton(icon: Icon(Icons.calendar_today), onPressed: () { },),
textInputType: TextInputType.number,
controller: _toDateController,
onTap: () {
@ -369,7 +254,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
// () => _valueToValidate4 = val);
return null;
},
onSaved: (val) => fromTime = val,
onSaved: (val) => fromTime = val!,
)
],
),
@ -396,7 +281,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
// () => _valueToValidate4 = val);
return null;
},
onSaved: (val) => toTime = val,
onSaved: (val) => toTime = val!,
)
],
),
@ -420,7 +305,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
AppTextFormField(
hintText: TranslationBase.of(context).fromDate,
borderColor: Colors.white,
prefix: IconButton(icon: Icon(Icons.calendar_today)),
prefix: IconButton(icon: Icon(Icons.calendar_today), onPressed: () { },),
textInputType: TextInputType.number,
readOnly: true,
controller: _toDateController,
@ -448,7 +333,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
hintText: TranslationBase.of(context).toDate,
readOnly: true,
borderColor: Colors.white,
prefix: IconButton(icon: Icon(Icons.calendar_today)),
prefix: IconButton(icon: Icon(Icons.calendar_today), onPressed: () { },),
textInputType: TextInputType.number,
controller: _toDateController2,
onTap: () {
@ -550,8 +435,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
model2.coveringDoctors.length > 0
? Expanded(
if (model2.coveringDoctors.length > 0) Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownSearch(
mode: Mode.BOTTOM_SHEET,
@ -605,69 +489,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
),
),
),
// DropdownButtonHideUnderline(
// child: DropdownButton(
// focusColor: Colors.grey,
// isExpanded: true,
// value: doctorID == null
// ? model2
// .coveringDoctors[0]
// ['doctorID']
// .toString()
// : doctorID,
// iconSize: 40,
// elevation: 16,
// selectedItemBuilder:
// (BuildContext context) {
// return model2
// .coveringDoctors
// .map((item) {
// return Row(
// mainAxisSize:
// MainAxisSize.max,
// children: <Widget>[
// AppText(
// projectsProvider
// .isArabic
// ? item[
// 'doctorNameN']
// : item[
// 'doctorName'],
// fontSize: SizeConfig
// .textMultiplier *
// 2.1,
// ),
// ],
// );
// }).toList();
// },
// onChanged: (newValue) => {
// setState(() {
// doctorID = newValue;
// })
// },
// items: model2
// .coveringDoctors
// .map((item) {
// return DropdownMenuItem<
// String>(
// value: item['doctorID']
// .toString(),
// child: Text(
// projectsProvider
// .isArabic
// ? item[
// 'doctorNameN']
// : item[
// 'doctorName'],
// textAlign:
// TextAlign.start,
// ),
// );
// }).toList(),
// )),
)
: SizedBox(),
) else SizedBox(),
],
)
],

@ -8,8 +8,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ProfileMedicalInfoWidgetSearch extends StatefulWidget {
final String from;
final String to;
final String? from;
final String? to;
final PatiantInformtion patient;
final String patientType;
final String? arrivalType;
@ -21,8 +21,8 @@ class ProfileMedicalInfoWidgetSearch extends StatefulWidget {
required this.patient,
required this.patientType,
this.arrivalType,
required this.from,
required this.to,
this.from,
this.to,
this.isInpatient = false,
this.isDischargedPatient});

@ -35,7 +35,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.8.1"
autocomplete_textfield:
dependency: "direct main"
description:
@ -154,7 +154,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.1.0"
charcode:
dependency: transitive
description:
@ -315,7 +315,7 @@ packages:
name: dropdown_search
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "2.0.1"
equatable:
dependency: transitive
description:
@ -769,7 +769,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.10"
meta:
dependency: transitive
description:
@ -1173,7 +1173,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.2"
timing:
dependency: transitive
description:
@ -1257,7 +1257,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.0"
video_player:
dependency: transitive
description:

@ -45,7 +45,7 @@ dependencies:
#Icons
eva_icons_flutter: ^3.0.0
font_awesome_flutter: ^9.0.0
dropdown_search: ^0.6.1
dropdown_search: ^2.0.1
flutter_staggered_grid_view: ^0.4.0
expandable: ^5.0.1

Loading…
Cancel
Save