merge-requests/202/head
Elham Rababah 5 years ago
parent ab9740ccdd
commit 8a6ea1c0c5

@ -236,7 +236,7 @@ class _AssessmentPageState extends State<AssessmentPage> {
height: 6, height: 6,
), ),
AppText( AppText(
"Some short remark about the allergy", widget.mySelectedAssessment.remark,
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
), ),
@ -268,7 +268,9 @@ class _AssessmentPageState extends State<AssessmentPage> {
Column( Column(
children: [ children: [
InkWell( InkWell(
onTap: () {}, onTap: () {
openAssessmentDialog(context);
},
child: Icon(EvaIcons child: Icon(EvaIcons
.edit2Outline), .edit2Outline),
) )
@ -334,14 +336,15 @@ class AddAssessmentDetails extends StatefulWidget {
} }
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> { class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
MasterKeyModel _selectedDiagnosisCondition; // MasterKeyModel _selectedDiagnosisCondition;
MasterKeyModel _selectedDiagnosisType; // MasterKeyModel _selectedDiagnosisType;
TextEditingController remarkController = TextEditingController(); TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController( TextEditingController appointmentIdController = TextEditingController(
text: "234567"); text: "234567");
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
remarkController.text = widget.mySelectedAssessment.remark??"";
final screenSize = MediaQuery final screenSize = MediaQuery
.of(context) .of(context)
.size; .size;
@ -433,14 +436,14 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
? () { ? () {
MasterKeyDailog dialog = MasterKeyDailog( MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition, list: model.listOfDiagnosisCondition,
selectedValue: widget.mySelectedAssessment
.selectedDiagnosisCondition,
okText: TranslationBase okText: TranslationBase
.of(context) .of(context)
.ok, .ok,
okFunction: ( okFunction: (
MasterKeyModel selectedValue) { MasterKeyModel selectedValue) {
setState(() { setState(() {
_selectedDiagnosisCondition =
selectedValue;
widget.mySelectedAssessment widget.mySelectedAssessment
.selectedDiagnosisCondition = .selectedDiagnosisCondition =
selectedValue; selectedValue;
@ -459,8 +462,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
"Condition", "Condition",
_selectedDiagnosisCondition != null widget.mySelectedAssessment
? _selectedDiagnosisCondition .selectedDiagnosisCondition != null
? widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn .nameEn
: null, : null,
true), true),
@ -485,7 +490,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction: ( okFunction: (
MasterKeyModel selectedValue) { MasterKeyModel selectedValue) {
setState(() { setState(() {
_selectedDiagnosisCondition = widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue; selectedValue;
}); });
}, },
@ -502,8 +508,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
"Condition", "Condition",
_selectedDiagnosisCondition != null widget.mySelectedAssessment
? _selectedDiagnosisCondition .selectedDiagnosisCondition != null
? widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn .nameEn
: null, : null,
true), true),
@ -527,11 +535,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction: ( okFunction: (
MasterKeyModel selectedValue) { MasterKeyModel selectedValue) {
setState(() { setState(() {
_selectedDiagnosisType = // _selectedDiagnosisType =
selectedValue; // selectedValue;
widget.mySelectedAssessment widget.mySelectedAssessment
.selectedDiagnosisType = .selectedDiagnosisType =
_selectedDiagnosisType; selectedValue;
}); });
}, },
); );
@ -547,8 +555,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
"Type", "Type",
_selectedDiagnosisType != null widget.mySelectedAssessment
? _selectedDiagnosisType.nameEn .selectedDiagnosisType != null
? widget.mySelectedAssessment
.selectedDiagnosisType.nameEn
: null, : null,
true), true),
enabled: false, enabled: false,

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -70,10 +71,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 0 ? 5 : 10, height: index == 0 ? 5 : 10,
), ),
Texts('SUBJECTIVE', AppText(
variant: "bodyText", "SUBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -82,7 +84,7 @@ class StepsWidget extends StatelessWidget {
top: index == 1 ? 15 : 30, top: index == 1 ? 15 : 30,
left: MediaQuery.of(context).size.width * 0.28, left: MediaQuery.of(context).size.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -119,10 +121,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 1 ? 5 : 10, height: index == 1 ? 5 : 10,
), ),
Texts('OBJECTIVE', AppText(
variant: "bodyText", "OBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -131,7 +134,10 @@ class StepsWidget extends StatelessWidget {
top: index == 2 ? 15 : 30, top: index == 2 ? 15 : 30,
left: MediaQuery.of(context).size.width * 0.52, left: MediaQuery.of(context).size.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(3) : null, onTap: () {
if(index >= 3)
changeCurrentTab(2);
},
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -168,10 +174,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 2 ? 5 : 10, height: index == 2 ? 5 : 10,
), ),
Texts('ASSESSMENT', AppText(
variant: "bodyText", "ASSESSMENT",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -212,15 +219,17 @@ class StepsWidget extends StatelessWidget {
? Colors.white ? Colors.white
: Colors.grey, : Colors.grey,
), ),
), )
), ),
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height: index == 3 ? 5 : 10,
), ),
Texts('PLAN', AppText(
variant: "bodyText", "PLAN",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), textAlign: TextAlign.center,
fontSize: 14,
),
], ],
), ),
), ),
@ -274,18 +283,19 @@ class StepsWidget extends StatelessWidget {
color: index == 0 color: index == 0
? Colors.black ? Colors.black
: index > 0 : index > 0
? Colors.white ? Colors.white
: Colors.grey, : Colors.grey,
), ),
), ),
), ),
SizedBox( SizedBox(
height: index == 0 ? 5 : 10, height: index == 0 ? 5 : 10,
), ),
Texts('SUBJECTIVE', AppText(
variant: "bodyText", "SUBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 16,
),
], ],
), ),
), ),
@ -331,10 +341,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 1 ? 5 : 10, height: index == 1 ? 5 : 10,
), ),
Texts('OBJECTIVE', AppText(
variant: "bodyText", "OBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -343,7 +354,7 @@ class StepsWidget extends StatelessWidget {
top: index == 2 ? 15 : 30, top: index == 2 ? 15 : 30,
right: MediaQuery.of(context).size.width * 0.52, right: MediaQuery.of(context).size.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(3) : null, onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -383,10 +394,11 @@ class StepsWidget extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.only(right: 2), padding: const EdgeInsets.only(right: 2),
child: Texts('ASSESSMENT', child: AppText(
variant: "bodyText", "ASSESSMENT",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
), ),
], ],
), ),
@ -433,10 +445,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height: index == 3 ? 5 : 10,
), ),
Texts('PLAN', AppText(
variant: "bodyText", "PLAN",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),

@ -2,16 +2,17 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// ignore: must_be_immutable
class MasterKeyDailog extends StatefulWidget { class MasterKeyDailog extends StatefulWidget {
final List<MasterKeyModel> list; final List<MasterKeyModel> list;
final okText; final okText;
final Function(MasterKeyModel) okFunction; final Function(MasterKeyModel) okFunction;
MasterKeyModel selectedValue; MasterKeyModel selectedValue;
MasterKeyDailog( MasterKeyDailog(
{@required this.list, {@required this.list,
@required this.okText, @required this.okText,
@required this.okFunction}); @required this.okFunction, this.selectedValue});
@override @override
_MasterKeyDailogState createState() => _MasterKeyDailogState(); _MasterKeyDailogState createState() => _MasterKeyDailogState();

Loading…
Cancel
Save