|
|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
|
|
|
|
@ -14,19 +13,17 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_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/expandable-widget-header-body.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../SOAP_open_items.dart';
|
|
|
|
|
import '../SOAP_step_header.dart';
|
|
|
|
|
import '../expandable_SOAP_widget.dart';
|
|
|
|
|
import 'examination-item-card.dart';
|
|
|
|
|
import 'objective-add-examination-page.dart';
|
|
|
|
|
|
|
|
|
|
@ -104,205 +101,110 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
|
widget.changeLoadingState(false);
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
// baseViewModel: model,
|
|
|
|
|
body: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
|
|
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color.fromRGBO(248, 248, 248, 1),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.95,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
border: Border.fromBorderSide(BorderSide(
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
width: 0.4,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"${TranslationBase.of(context).physicalSystemExamination}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.1,
|
|
|
|
|
fontWeight: isSysExaminationExpand
|
|
|
|
|
? FontWeight.w700
|
|
|
|
|
: FontWeight.normal,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.asterisk,
|
|
|
|
|
color: Colors.black/*AppGlobal.appPrimaryColor*/,
|
|
|
|
|
size: 12,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isSysExaminationExpand =
|
|
|
|
|
!isSysExaminationExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(isSysExaminationExpand
|
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
|
: Icons.keyboard_arrow_down))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
openExaminationList(context);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
vertical: 8, horizontal: 8.0),
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.symmetric(vertical: 8),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
width: 0.5),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(8),
|
|
|
|
|
),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"${TranslationBase.of(context).addExamination}",
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
1.8,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"${TranslationBase.of(context).searchHere}",
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
1.8,
|
|
|
|
|
color: Colors.grey.shade700,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.add_box_rounded,
|
|
|
|
|
size: 25,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
/* ...List.generate(
|
|
|
|
|
widget.mySelectedExamination.length,
|
|
|
|
|
(index) => Container(
|
|
|
|
|
child: ExaminationIitemCard(
|
|
|
|
|
widget.mySelectedExamination[
|
|
|
|
|
index], () {
|
|
|
|
|
removeExamination(widget
|
|
|
|
|
.mySelectedExamination[
|
|
|
|
|
index]
|
|
|
|
|
.selectedExamination);
|
|
|
|
|
}),
|
|
|
|
|
)),*/
|
|
|
|
|
Column(
|
|
|
|
|
children: widget.mySelectedExamination
|
|
|
|
|
.map((examination) {
|
|
|
|
|
return ExaminationIitemCard(
|
|
|
|
|
examination, () {
|
|
|
|
|
removeExamination(examination
|
|
|
|
|
.selectedExamination);
|
|
|
|
|
});
|
|
|
|
|
}).toList(),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
isExpand: isSysExaminationExpand,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
// baseViewModel: model,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SOAPStepHeader(
|
|
|
|
|
currentIndex: widget.currentIndex,
|
|
|
|
|
changePageViewIndex: widget.changePageViewIndex),
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
|
headerTitle:
|
|
|
|
|
TranslationBase.of(context).physicalSystemExamination,
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isSysExaminationExpand = !isSysExaminationExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SOAPOpenItems(label: "${TranslationBase.of(context).addExamination}",onTap: () {
|
|
|
|
|
openExaminationList(context);
|
|
|
|
|
},),
|
|
|
|
|
Column(
|
|
|
|
|
children:
|
|
|
|
|
widget.mySelectedExamination.map((examination) {
|
|
|
|
|
return ExaminationIitemCard(examination, () {
|
|
|
|
|
removeExamination(examination.selectedExamination);
|
|
|
|
|
});
|
|
|
|
|
}).toList(),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
isExpanded: isSysExaminationExpand,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).previous,
|
|
|
|
|
color: HexColor("#EAEAEA"),
|
|
|
|
|
fontColor: Colors.black,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.changePageViewIndex(0);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).next,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
color: widget.mySelectedExamination != null &&
|
|
|
|
|
widget.mySelectedExamination.length > 0
|
|
|
|
|
? HexColor("#D02127")
|
|
|
|
|
: HexColor("#A5A5A5"),
|
|
|
|
|
fontColor: widget.mySelectedExamination != null &&
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
bottomSheet: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(0.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: HexColor('#707070'),
|
|
|
|
|
width: 0),
|
|
|
|
|
),
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.1,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width *0.4,
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).previous,
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|
fontColor: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.changePageViewIndex(0);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: MediaQuery.of(context).size.width *0.1,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width *0.4,
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).next,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
color: widget.mySelectedExamination != null &&
|
|
|
|
|
widget.mySelectedExamination.length > 0
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
: HexColor("#A5A5A5"),
|
|
|
|
|
fontColor: widget.mySelectedExamination != null &&
|
|
|
|
|
widget.mySelectedExamination.length > 0 ? Colors.white : HexColor("#5A5A5A"),
|
|
|
|
|
disabled: widget.mySelectedExamination != null &&
|
|
|
|
|
widget.mySelectedExamination.length > 0
|
|
|
|
|
? false
|
|
|
|
|
: true,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await submitUpdateObjectivePage(model);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
disabled: widget.mySelectedExamination != null &&
|
|
|
|
|
widget.mySelectedExamination.length > 0
|
|
|
|
|
? false
|
|
|
|
|
: true,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await submitUpdateObjectivePage(model);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)));
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submitUpdateObjectivePage(SOAPViewModel model) async {
|
|
|
|
|
|