diff --git a/lib/config/config.dart b/lib/config/config.dart index 9596a029..62625b40 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -336,7 +336,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 5.8; +const VERSION_ID = 6.0; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index d5999b21..b975f6d9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -946,4 +946,5 @@ const Map> localizedValues = { "approvals22": {"en": "Approvals", "ar": "التامين"}, "severe": {"en": "Severe", "ar": "الشدة"}, "graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"}, + "discharged": {"en": "Discharged", "ar": "المصرف"}, }; diff --git a/lib/core/service/patientInPatientService.dart b/lib/core/service/patientInPatientService.dart index 3e0ba4a4..6ec77514 100644 --- a/lib/core/service/patientInPatientService.dart +++ b/lib/core/service/patientInPatientService.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class PatientInPatientService extends BaseService { List inPatientList = List(); + List myInPatientList = List(); Future getInPatientList( PatientSearchRequestModel requestModel, bool isMyInpatient) async { @@ -21,9 +22,14 @@ class PatientInPatientService extends BaseService { GET_PATIENT_IN_PATIENT_LIST, onSuccess: (dynamic response, int statusCode) { inPatientList.clear(); + myInPatientList.clear(); response['List_MyInPatient'].forEach((v) { - inPatientList.add(PatiantInformtion.fromJson(v)); + PatiantInformtion patient = PatiantInformtion.fromJson(v); + inPatientList.add(patient); + if(patient.doctorId == doctorProfile.doctorID){ + myInPatientList.add(patient); + } }); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 8192b1a8..edf9142a 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import '../../locator.dart'; import 'base_view_model.dart'; -class PatientSearchViewModel extends BaseViewModel{ +class PatientSearchViewModel extends BaseViewModel { OutPatientService _outPatientService = locator(); List get patientList => _outPatientService.patientList; @@ -24,10 +24,14 @@ class PatientSearchViewModel extends BaseViewModel{ if (strExist) { filterData = []; for (var i = 0; i < _outPatientService.patientList.length; i++) { - String firstName = _outPatientService.patientList[i].firstName.toUpperCase(); - String lastName = _outPatientService.patientList[i].lastName.toUpperCase(); - String mobile = _outPatientService.patientList[i].mobileNumber.toUpperCase(); - String patientID = _outPatientService.patientList[i].patientId.toString(); + String firstName = + _outPatientService.patientList[i].firstName.toUpperCase(); + String lastName = + _outPatientService.patientList[i].lastName.toUpperCase(); + String mobile = + _outPatientService.patientList[i].mobileNumber.toUpperCase(); + String patientID = + _outPatientService.patientList[i].patientId.toString(); if (firstName.contains(str.toUpperCase()) || lastName.contains(str.toUpperCase()) || @@ -43,19 +47,19 @@ class PatientSearchViewModel extends BaseViewModel{ } } - getOutPatient(PatientSearchRequestModel patientSearchRequestModel , {bool isLocalBusy = false}) async { - if(isLocalBusy) { + getOutPatient(PatientSearchRequestModel patientSearchRequestModel, + {bool isLocalBusy = false}) async { + if (isLocalBusy) { setState(ViewState.BusyLocal); } else { setState(ViewState.Busy); } - await getDoctorProfile(isGetProfile: true); + await getDoctorProfile(isGetProfile: true); patientSearchRequestModel.doctorID = doctorProfile.doctorID; - await _outPatientService.getOutPatient( - patientSearchRequestModel); + await _outPatientService.getOutPatient(patientSearchRequestModel); if (_outPatientService.hasError) { error = _outPatientService.error; - if(isLocalBusy) { + if (isLocalBusy) { setState(ViewState.ErrorLocal); } else { setState(ViewState.Error); @@ -66,10 +70,11 @@ class PatientSearchViewModel extends BaseViewModel{ } } - getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async { + getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, + {bool isLocalBusy = false}) async { setState(ViewState.Busy); - await _outPatientService.getPatientFileInformation( - patientSearchRequestModel); + await _outPatientService + .getPatientFileInformation(patientSearchRequestModel); if (_outPatientService.hasError) { error = _outPatientService.error; setState(ViewState.Error); @@ -79,30 +84,21 @@ class PatientSearchViewModel extends BaseViewModel{ } } - - - getPatientBasedOnDate ( - {item, PatientSearchRequestModel patientSearchRequestModel, PatientType selectedPatientType, - bool isSearchWithKeyInfo })async { + getPatientBasedOnDate( + {item, + PatientSearchRequestModel patientSearchRequestModel, + PatientType selectedPatientType, + bool isSearchWithKeyInfo}) async { String dateTo; String dateFrom; if (item == 'Previous') { - - selectedFromDate = DateTime(DateTime.now().year, DateTime.now().month-1, - DateTime.now().day); - selectedToDate = DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day-1); - dateTo = DateUtils.convertDateToFormat( - selectedToDate, - 'yyyy-MM-dd'); - dateFrom = DateUtils.convertDateToFormat( - selectedFromDate, - 'yyyy-MM-dd'); - - + selectedFromDate = DateTime( + DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); + selectedToDate = DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); + dateTo = DateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd'); + dateFrom = DateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); } else if (item == 'Next Week') { - - dateTo = DateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 6), @@ -117,76 +113,78 @@ class PatientSearchViewModel extends BaseViewModel{ DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); - dateTo= DateUtils.convertDateToFormat( + dateTo = DateUtils.convertDateToFormat( DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); } PatientSearchRequestModel currentModel = PatientSearchRequestModel(); - currentModel.patientID = patientSearchRequestModel.patientID; - currentModel.firstName = patientSearchRequestModel.firstName; - currentModel.lastName = patientSearchRequestModel.lastName; + currentModel.patientID = patientSearchRequestModel.patientID; + currentModel.firstName = patientSearchRequestModel.firstName; + currentModel.lastName = patientSearchRequestModel.lastName; currentModel.middleName = patientSearchRequestModel.middleName; currentModel.doctorID = patientSearchRequestModel.doctorID; currentModel.from = dateFrom; currentModel.to = dateTo; await getOutPatient(currentModel, isLocalBusy: true); filterData = _outPatientService.patientList; - } + PatientInPatientService _inPatientService = + locator(); + List get inPatientList => _inPatientService.inPatientList; - PatientInPatientService _inPatientService = - locator(); + List get myIinPatientList => + _inPatientService.myInPatientList; - List get _inPatientList => _inPatientService.inPatientList; List filteredInPatientItems = List(); Future getInPatientList(PatientSearchRequestModel requestModel, - {bool isMyInpatient = false, bool isFirstTime = true}) async { - await getDoctorProfile(); - if (isFirstTime) + {bool isMyInpatient = false}) async { + await getDoctorProfile(); setState(ViewState.Busy); - else - setState(ViewState.BusyLocal); - await _inPatientService.getInPatientList(requestModel, false); + + if (inPatientList.length == 0) + await _inPatientService.getInPatientList(requestModel, false); if (_inPatientService.hasError) { error = _inPatientService.error; setState(ViewState.Error); } else { filteredInPatientItems.clear(); - if (_inPatientList.length > 0) - filteredInPatientItems.addAll(_inPatientList); + if (inPatientList.length > 0) + filteredInPatientItems.addAll(inPatientList); setState(ViewState.Idle); } } + void clearPatientList(){ + _inPatientService.inPatientList = []; + _inPatientService.myInPatientList = []; + } + void filterSearchResults(String query) { var strExist = query.length > 0 ? true : false; if (strExist) { filteredInPatientItems = []; - for (var i = 0; i < _inPatientList.length; i++) { - String firstName = _inPatientList[i].firstName.toUpperCase(); - String lastName = _inPatientList[i].lastName.toUpperCase(); - String mobile = _inPatientList[i].mobileNumber.toUpperCase(); - String patientID = _inPatientList[i].patientId.toString(); + for (var i = 0; i < inPatientList.length; i++) { + String firstName = inPatientList[i].firstName.toUpperCase(); + String lastName = inPatientList[i].lastName.toUpperCase(); + String mobile = inPatientList[i].mobileNumber.toUpperCase(); + String patientID = inPatientList[i].patientId.toString(); if (firstName.contains(query.toUpperCase()) || lastName.contains(query.toUpperCase()) || mobile.contains(query) || patientID.contains(query)) { - filteredInPatientItems.add(_inPatientList[i]); + filteredInPatientItems.add(inPatientList[i]); } } notifyListeners(); } else { - if (_inPatientList.length > 0) - filteredInPatientItems.clear(); - filteredInPatientItems.addAll(_inPatientList); + if (inPatientList.length > 0) filteredInPatientItems.clear(); + filteredInPatientItems.addAll(inPatientList); notifyListeners(); } } - - } diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index 28f7b834..8e183ca8 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -29,12 +29,15 @@ class _DischargedPatientState extends State { appBarTitle: 'Discharged Patient', subtitle: "Last Three Months", backgroundColor: Colors.grey[200], - isShowAppBar: true, + isShowAppBar: false, baseViewModel: model, - body: model.myDischargedPatient.isEmpty?Center( + body: model.myDischargedPatient.isEmpty? Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ + Container( + height: MediaQuery.of(context).size.height * 0.070, + ), SizedBox( height: 100, ), @@ -53,6 +56,9 @@ class _DischargedPatientState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ + Container( + height: MediaQuery.of(context).size.height * 0.070, + ), SizedBox(height: 12,), Container( width: double.maxFinite, diff --git a/lib/screens/patients/InPatientPage.dart b/lib/screens/patients/InPatientPage.dart new file mode 100644 index 00000000..e26a5d9a --- /dev/null +++ b/lib/screens/patients/InPatientPage.dart @@ -0,0 +1,164 @@ +import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.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/PatientCard.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; + +import '../../routes.dart'; + +class InPatientPage extends StatefulWidget { + + final bool isMyInPatient; + + InPatientPage(this.isMyInPatient); + + @override + _InPatientPageState createState() => _InPatientPageState(); +} + +class _InPatientPageState extends State { + TextEditingController _searchController = TextEditingController(); + PatientSearchRequestModel requestModel = PatientSearchRequestModel(); + + @override + void dispose() { + _searchController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getInPatientList(requestModel), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.070, + ), + Container( + margin: EdgeInsets.all(16.0), + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).searchPatientName, + isTextFieldHasSuffix: true, + suffixIcon: IconButton( + icon: Icon( + Icons.search, + color: Colors.black, + ), + onPressed: () {}, + ), + controller: _searchController, + onChanged: (value) { + model.filterSearchResults(value); + }), + ), + model.filteredInPatientItems.length > 0 + ? Expanded( + child: Container( + margin: EdgeInsets.symmetric(horizontal: 16.0), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + model.filteredInPatientItems.length, (index) { + if (!widget.isMyInPatient) + return PatientCard( + patientInfo: + model.filteredInPatientItems[index], + patientType: "1", + arrivalType: "1", + isInpatient: true, + isMyPatient: model + .filteredInPatientItems[index] + .doctorId == + model.doctorProfile.doctorID, + onTap: () { + FocusScopeNode currentFocus = + FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + } + + Navigator.of(context).pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": model + .filteredInPatientItems[index], + "patientType": "1", + "from": "0", + "to": "0", + "isSearch": false, + "isInpatient": true, + "arrivalType": "1", + }); + }, + ); + else if (model.filteredInPatientItems[index] + .doctorId == + model.doctorProfile.doctorID && + widget.isMyInPatient) + return PatientCard( + patientInfo: + model.filteredInPatientItems[index], + patientType: "1", + arrivalType: "1", + isInpatient: true, + isMyPatient: model + .filteredInPatientItems[index] + .doctorId == + model.doctorProfile.doctorID, + onTap: () { + FocusScopeNode currentFocus = + FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + } + + Navigator.of(context).pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": model + .filteredInPatientItems[index], + "patientType": "1", + "from": "0", + "to": "0", + "isSearch": false, + "isInpatient": true, + "arrivalType": "1", + }); + }, + ); + else + return SizedBox(); + }), + SizedBox( + height: 15, + ) + ], + ), + ), + ), + ) + : Expanded( + child: SingleChildScrollView( + child: Container( + child: ErrorMessage( + error: + TranslationBase.of(context).noDataAvailable)), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/patients/PatientsInPatientScreen.dart b/lib/screens/patients/PatientsInPatientScreen.dart index 7d41b3cb..cdd8b357 100644 --- a/lib/screens/patients/PatientsInPatientScreen.dart +++ b/lib/screens/patients/PatientsInPatientScreen.dart @@ -15,22 +15,36 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils. import 'package:flutter/material.dart'; import '../../routes.dart'; +import 'DischargedPatientPage.dart'; +import 'InPatientPage.dart'; class PatientInPatientScreen extends StatefulWidget { @override _PatientInPatientScreenState createState() => _PatientInPatientScreenState(); } -class _PatientInPatientScreenState extends State { - PatientSearchRequestModel requestModel = PatientSearchRequestModel(); +class _PatientInPatientScreenState extends State with SingleTickerProviderStateMixin{ + + TabController _tabController; int _activeTab = 0; - TextEditingController _searchController = TextEditingController(); + @override + void initState() { + super.initState(); + _tabController = TabController(length: 3, vsync: this); + _tabController.addListener(_handleTabSelection); + } @override void dispose() { - _searchController.dispose(); super.dispose(); + _tabController.dispose(); + } + + _handleTabSelection() { + setState(() { + _activeTab = _tabController.index; + }); } @override @@ -38,7 +52,7 @@ class _PatientInPatientScreenState extends State { final screenSize = MediaQuery.of(context).size; return BaseView( - onModelReady: (model) => model.getInPatientList(requestModel), + onModelReady: (model) => model.clearPatientList(), builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, @@ -71,168 +85,107 @@ class _PatientInPatientScreenState extends State { ]), ), ), - tabsBar(context, screenSize, model), - Container( - margin: EdgeInsets.all(16.0), - child: AppTextFieldCustom( - hintText: TranslationBase.of(context) - .searchPatientName, - isTextFieldHasSuffix: true, - suffixIcon: IconButton( - icon: Icon( - Icons.search, - color: Colors.black, - ), - onPressed: () {}, - ), - controller: _searchController, - onChanged: (value) { - model.filterSearchResults(value); - }), - ), - model.filteredInPatientItems.length > 0 - ? Expanded( - child: Container( - margin: EdgeInsets.symmetric(horizontal: 16.0), - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // const SizedBox( - // height: 16, - // ), - ...List.generate(model.filteredInPatientItems.length, (index) { - if(_activeTab == 0) - return PatientCard( - patientInfo: model.filteredInPatientItems[index], - patientType: "1", - arrivalType: "1", - isInpatient: true, - isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID, - onTap: () { - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { - currentFocus.unfocus(); - } - - Navigator.of(context) - .pushNamed(PATIENTS_PROFILE, arguments: { - "patient": model.filteredInPatientItems[index], - "patientType": "1", - "from": "0", - "to": "0", - "isSearch": false, - "isInpatient": true, - "arrivalType": "1", - }); - }, - ); - else if(model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID && _activeTab==1) - return PatientCard( - patientInfo: model.filteredInPatientItems[index], - patientType: "1", - arrivalType: "1", - isInpatient: true, - isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID, - onTap: () { - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { - currentFocus.unfocus(); - } - - Navigator.of(context) - .pushNamed(PATIENTS_PROFILE, arguments: { - "patient": model.filteredInPatientItems[index], - "patientType": "1", - "from": "0", - "to": "0", - "isSearch": false, - "isInpatient": true, - "arrivalType": "1", - }); - }, - ); - else return SizedBox(); - }), - SizedBox(height: 15,) - ], + Expanded( + child: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070), + child: Container( + height: MediaQuery.of(context).size.height * 0.070, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.5), //width: 0.7 ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: false, + controller: _tabController, + indicatorColor: Colors.transparent, + indicatorWeight: 1.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + tabWidget(screenSize, _activeTab == 0, TranslationBase.of(context).inPatientAll.toUpperCase(), counter: model.inPatientList.length), + tabWidget(screenSize, _activeTab == 1, TranslationBase.of(context).inPatient.toUpperCase(), counter: model.myIinPatientList.length), + tabWidget(screenSize, _activeTab == 2, TranslationBase.of(context).discharged.toUpperCase()), + ], ), ), - ) - : Expanded( - child: SingleChildScrollView( - child: Container( - child: ErrorMessage( - error: TranslationBase.of(context).noDataAvailable)), ), ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + InPatientPage(false), + InPatientPage(true), + DischargedPatient(), + ], + ), + ), + ], + ), + ), + ), ], ), ), ); } - Widget tabsBar( - BuildContext context, Size screenSize, PatientSearchViewModel model) { - List _tabs = [ - TranslationBase.of(context).inPatientAll.toUpperCase(), - TranslationBase.of(context).inPatient.toUpperCase(), - ]; - - return Container( - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - Color(0Xffffffff), Color(0xFFCCCCCC), - borderRadius: 4, borderWidth: 0), - child: Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: _tabs.map((item) { - bool _isActive = _tabs[_activeTab] == item ? true : false; + Widget tabWidget(Size screenSize, bool isActive, String title, {int counter = -1}){ - return Expanded( - child: InkWell( - onTap: () async { - setState(() { - _activeTab = _tabs.indexOf(item); - }); - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { - currentFocus.unfocus(); - } - if (_activeTab==0) { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getInPatientList(requestModel, - isMyInpatient: _activeTab == 1, isFirstTime: false); - GifLoaderDialogUtils.hideDialog( - context); - } - }, - child: Center( - child: Container( - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - _isActive - ? Color(0xFFD02127 /*B8382B*/) - : Color(0xFFEAEAEA), - _isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), - child: Center( + return Center( + child: Container( + height: screenSize.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + isActive + ? Color(0xFFD02127 /*B8382B*/) + : Color(0xFFEAEAEA), + isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText( + title, + fontSize: SizeConfig.textMultiplier * 1.8, + color: isActive ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), + if (counter != -1) + Container( + margin: EdgeInsets.all(4), + width: 15, + height: 15, + decoration: BoxDecoration( + color: isActive + ? Colors.white + : Color(0xFFD02127), + shape: BoxShape.circle, + ), + child: Center( + child: FittedBox( child: AppText( - item, - fontSize: SizeConfig.textMultiplier * 1.8, - color: _isActive ? Colors.white : Color(0xFF2B353E), + "$counter", + fontSize: SizeConfig.textMultiplier * 1.5, + color: !isActive ? Colors.white : Color(0xFFD02127), fontWeight: FontWeight.w700, ), ), ), ), - ), - ); - }).toList(), + ], + ), ), ); } diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index 457fe04e..51aa78d4 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -39,7 +39,7 @@ class ProfileGridForInPatient extends StatelessWidget { NeverScrollableScrollPhysics(), crossAxisSpacing: 10, mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, + childAspectRatio: 1 / 1.02, crossAxisCount: 3, children: [ PatientProfileButton( diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index cc6513d0..6413865b 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1301,8 +1301,8 @@ class TranslationBase { String get insurance22 => localizedValues["insurance22"][locale.languageCode]; String get approvals22 => localizedValues["approvals22"][locale.languageCode]; String get severe => localizedValues["severe"][locale.languageCode]; - String get graphDetails => - localizedValues["graphDetails"][locale.languageCode]; + String get graphDetails => localizedValues["graphDetails"][locale.languageCode]; + String get discharged => localizedValues["discharged"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 9a027e36..7907cac1 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -47,8 +47,8 @@ class PatientProfileButton extends StatelessWidget { ProjectViewModel projectsProvider = Provider.of(context); return new Container( - margin: new EdgeInsets.symmetric(horizontal: 4.0), - padding: EdgeInsets.fromLTRB(10, 10, 10, 5), + margin: EdgeInsets.symmetric(horizontal: 0.0), + padding: EdgeInsets.symmetric(horizontal: 4), child: InkWell( onTap: isDisable ? null @@ -72,7 +72,7 @@ class PatientProfileButton extends StatelessWidget { )), Container( alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft, - padding: EdgeInsets.all(5), + padding: EdgeInsets.symmetric(horizontal: 8), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/pubspec.lock b/pubspec.lock index e9386145..9d52ce65 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -566,7 +566,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3-nullsafety.1" + version: "0.6.2" json_annotation: dependency: transitive description: @@ -608,7 +608,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.4" + version: "1.3.0-nullsafety.3" mime: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.10.0-nullsafety.1" sticky_headers: dependency: "direct main" description: @@ -1091,5 +1091,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <=2.11.0-213.1.beta" + dart: ">=2.10.0 <2.11.0" flutter: ">=1.22.0 <2.0.0"