|
|
|
@ -1,6 +1,11 @@
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/screens/live_care/live-care_transfer_to_admin.dart';
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.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/patients/profile/PatientProfileButton.dart';
|
|
|
|
@ -8,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-head
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
|
|
|
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
@ -31,6 +37,8 @@ class _EndCallScreenState extends State<EndCallScreen> {
|
|
|
|
String from;
|
|
|
|
String from;
|
|
|
|
String to;
|
|
|
|
String to;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LiveCarePatientViewModel liveCareModel;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final List<PatientProfileCardModel> cardsList = [
|
|
|
|
final List<PatientProfileCardModel> cardsList = [
|
|
|
|
@ -46,12 +54,16 @@ class _EndCallScreenState extends State<EndCallScreen> {
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'patient/vital_signs.png',
|
|
|
|
'patient/vital_signs.png',
|
|
|
|
isInPatient: isInpatient, onTap: () {
|
|
|
|
isInPatient: isInpatient, onTap: () {
|
|
|
|
Helpers.showConfirmationDialog(
|
|
|
|
Helpers.showConfirmationDialog(context,
|
|
|
|
context,
|
|
|
|
|
|
|
|
"${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).endLC} ${TranslationBase.of(context).consultation} ?",
|
|
|
|
"${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).endLC} ${TranslationBase.of(context).consultation} ?",
|
|
|
|
() {
|
|
|
|
() async {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
|
|
|
liveCareModel.endCallWithCharge(0);
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
if (liveCareModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
|
|
|
DrAppToastMsg.showErrorToast(liveCareModel.error);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, isDartIcon: true, dartIcon: DoctorApp.end_consultaion),
|
|
|
|
}, isDartIcon: true, dartIcon: DoctorApp.end_consultaion),
|
|
|
|
PatientProfileCardModel(
|
|
|
|
PatientProfileCardModel(
|
|
|
|
@ -65,13 +77,22 @@ class _EndCallScreenState extends State<EndCallScreen> {
|
|
|
|
dartIcon: DoctorApp.send_instruction),
|
|
|
|
dartIcon: DoctorApp.send_instruction),
|
|
|
|
PatientProfileCardModel(TranslationBase.of(context).transferTo,
|
|
|
|
PatientProfileCardModel(TranslationBase.of(context).transferTo,
|
|
|
|
TranslationBase.of(context).admin, '', 'patient/health_summary.png',
|
|
|
|
TranslationBase.of(context).admin, '', 'patient/health_summary.png',
|
|
|
|
onTap: () {},
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (BuildContext context) =>
|
|
|
|
|
|
|
|
LivaCareTransferToAdmin(patient:widget.patient)));
|
|
|
|
|
|
|
|
},
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
isDartIcon: true,
|
|
|
|
isDartIcon: true,
|
|
|
|
dartIcon: DoctorApp.transfer_to_admin),
|
|
|
|
dartIcon: DoctorApp.transfer_to_admin),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
return AppScaffold(
|
|
|
|
return BaseView<LiveCarePatientViewModel>(
|
|
|
|
|
|
|
|
onModelReady: (model) {
|
|
|
|
|
|
|
|
liveCareModel = model;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
|
|
|
baseViewModel: model,
|
|
|
|
appBarTitle: TranslationBase.of(context).patientProfile,
|
|
|
|
appBarTitle: TranslationBase.of(context).patientProfile,
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
isShowAppBar: true,
|
|
|
|
isShowAppBar: true,
|
|
|
|
@ -132,7 +153,8 @@ class _EndCallScreenState extends State<EndCallScreen> {
|
|
|
|
route: cardsList[index].route,
|
|
|
|
route: cardsList[index].route,
|
|
|
|
icon: cardsList[index].icon,
|
|
|
|
icon: cardsList[index].icon,
|
|
|
|
isInPatient: cardsList[index].isInPatient,
|
|
|
|
isInPatient: cardsList[index].isInPatient,
|
|
|
|
isDischargedPatient: cardsList[index].isDischargedPatient,
|
|
|
|
isDischargedPatient:
|
|
|
|
|
|
|
|
cardsList[index].isDischargedPatient,
|
|
|
|
isDisable: cardsList[index].isDisable,
|
|
|
|
isDisable: cardsList[index].isDisable,
|
|
|
|
onTap: cardsList[index].onTap,
|
|
|
|
onTap: cardsList[index].onTap,
|
|
|
|
isLoading: cardsList[index].isLoading,
|
|
|
|
isLoading: cardsList[index].isLoading,
|
|
|
|
@ -183,6 +205,7 @@ class _EndCallScreenState extends State<EndCallScreen> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|