From f6539c82a6fc90e2cda935afc5e790506c7b2946 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 19 May 2021 15:06:47 +0300 Subject: [PATCH] add live care card in home page --- .../patient/LiveCarePatientServices.dart | 5 ++ .../viewModel/LiveCarePatientViewModel.dart | 6 ++ lib/locator.dart | 4 ++ lib/screens/home/home_screen.dart | 15 +++++ .../live_care/LiveCarePatientScreen.dart | 59 +++++++++++++++++++ lib/screens/live_care/end_call_screen.dart | 2 - 6 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 lib/core/service/patient/LiveCarePatientServices.dart create mode 100644 lib/core/viewModel/LiveCarePatientViewModel.dart create mode 100644 lib/screens/live_care/LiveCarePatientScreen.dart diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart new file mode 100644 index 00000000..31d3cf82 --- /dev/null +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -0,0 +1,5 @@ +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; + +class LiveCarePatientServices extends BaseService{ + +} \ No newline at end of file diff --git a/lib/core/viewModel/LiveCarePatientViewModel.dart b/lib/core/viewModel/LiveCarePatientViewModel.dart new file mode 100644 index 00000000..de185de6 --- /dev/null +++ b/lib/core/viewModel/LiveCarePatientViewModel.dart @@ -0,0 +1,6 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; + +class LiveCarePatientViewModel extends BaseViewModel { + getPendingPatientERForDoctorApp() async {} +} diff --git a/lib/locator.dart b/lib/locator.dart index 4cb18514..1c369103 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -10,6 +10,7 @@ import 'package:get_it/get_it.dart'; import 'core/service/home/dasboard_service.dart'; import 'core/service/patient/DischargedPatientService.dart'; +import 'core/service/patient/LiveCarePatientServices.dart'; import 'core/service/patient/patient_service.dart'; import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart'; import 'core/service/patient/MyReferralPatientService.dart'; @@ -37,6 +38,7 @@ import 'core/service/patient/referred_patient_service.dart'; import 'core/service/home/schedule_service.dart'; import 'core/viewModel/DischargedPatientViewModel.dart'; import 'core/viewModel/InsuranceViewModel.dart'; +import 'core/viewModel/LiveCarePatientViewModel.dart'; import 'core/viewModel/PatientMuseViewModel.dart'; import 'core/viewModel/PatientSearchViewModel.dart'; import 'core/viewModel/SOAP_view_model.dart'; @@ -86,6 +88,7 @@ void setupLocator() { locator.registerLazySingleton(() => PatientInPatientService()); locator.registerLazySingleton(() => OutPatientService()); locator.registerLazySingleton(() => HospitalsService()); + locator.registerLazySingleton(() => LiveCarePatientServices()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); @@ -112,4 +115,5 @@ void setupLocator() { locator.registerFactory(() => DischargedPatientViewModel()); locator.registerFactory(() => PatientSearchViewModel()); locator.registerFactory(() => HospitalViewModel()); + locator.registerFactory(() => LiveCarePatientViewModel()); } diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 1b864430..cd610c0b 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -289,6 +289,21 @@ class _HomeScreenState extends State { child: ListView( scrollDirection: Axis.horizontal, children: [ + HomePatientCard( + backgroundColor: Color(0xffD02127), + backgroundIconColor: Colors.white12, + cardIcon: DoctorApp.inpatient, + textColor: Colors.white, + text: "Live Care Patients", + onTap: () { + Navigator.push( + context, + FadePage( + page: PatientInPatientScreen(), + ), + ); + }, + ), HomePatientCard( backgroundColor: Color(0xffD02127), backgroundIconColor: Colors.white12, diff --git a/lib/screens/live_care/LiveCarePatientScreen.dart b/lib/screens/live_care/LiveCarePatientScreen.dart new file mode 100644 index 00000000..9f5e55ac --- /dev/null +++ b/lib/screens/live_care/LiveCarePatientScreen.dart @@ -0,0 +1,59 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.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:flutter/material.dart'; + +class LiveCarePatientScreen extends StatefulWidget { + @override + _LiveCarePatientScreenState createState() => _LiveCarePatientScreenState(); +} + +class _LiveCarePatientScreenState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async {}, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + "Live Care Patients", + fontSize: SizeConfig.textMultiplier * 2.8, + fontWeight: FontWeight.bold, + color: Color(0xFF2B353E), + ), + ), + ]), + ), + ), + Expanded( + child: Column( + children: [], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index b4a7c415..880c8fd8 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -11,8 +11,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:hexcolor/hexcolor.dart'; -import '../../routes.dart'; - class EndCallScreen extends StatefulWidget { final PatiantInformtion patient;