add assessment_page code

pull/199/head
Elham Rababah 5 years ago
parent dc4250a4de
commit 1672d9a3a0

@ -7,7 +7,9 @@ enum MasterKeysService {
HistorySurgical,
PhysicalExamination,
AllergySeverity,
physiotherapyGoals
physiotherapyGoals,
DiagnosisCondition,
DiagnosisType
}
extension SelectedMasterKeysService on MasterKeysService {
@ -40,6 +42,11 @@ extension SelectedMasterKeysService on MasterKeysService {
break;
case MasterKeysService.physiotherapyGoals:
return 117;
break;case MasterKeysService.DiagnosisCondition:
return 34;
break;
case MasterKeysService.DiagnosisType:
return 35;
break;
}
}

@ -31,6 +31,8 @@ class LookupService extends BaseService {
List<MasterKeyModel> _physicalExaminationList = [];
List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = [];
Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false;
@ -111,6 +113,21 @@ class LookupService extends BaseService {
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.DiagnosisType:
listOfDiagnosisType.clear();
entryList.forEach((v) {
listOfDiagnosisType
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.DiagnosisCondition:
listOfDiagnosisCondition.clear();
entryList.forEach((v) {
listOfDiagnosisCondition
.add(MasterKeyModel.fromJson(v));
});
break;
}
}
}

@ -32,6 +32,8 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList;
List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList,...historySportList];
List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;

@ -0,0 +1,47 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAssessment {
MasterKeyModel selectedICD;
MasterKeyModel selectedDiagnosisCondition;
MasterKeyModel selectedDiagnosisType;
String remark;
int appointmentId;
MySelectedAssessment(
{this.selectedICD,
this.selectedDiagnosisCondition,
this.selectedDiagnosisType,
this.remark, this.appointmentId});
MySelectedAssessment.fromJson(Map<String, dynamic> json) {
selectedICD = json['selectedICD'] != null
? new MasterKeyModel.fromJson(json['selectedICD'])
: null;
selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
: null;
selectedDiagnosisType = json['selectedDiagnosisType'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisType'])
: null;
remark = json['remark'];
appointmentId = json['appointmentId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.selectedICD != null) {
data['selectedICD'] = this.selectedICD.toJson();
}
if (this.selectedDiagnosisCondition != null) {
data['selectedICD'] = this.selectedDiagnosisCondition.toJson();
}
if (this.selectedDiagnosisType != null) {
data['selectedICD'] = this.selectedDiagnosisType.toJson();
}
data['remark'] = this.remark;
data['appointmentId'] = this.appointmentId;
return data;
}
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -32,6 +33,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
List<MySelectedAllergy> myAllergiesList= List();
List<MasterKeyModel> myHistoryList = List();
List<MySelectedExamination> mySelectedExamination = List();
MySelectedAssessment mySelectedAssessment = new MySelectedAssessment();
changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex);
}
@ -159,7 +161,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
children: <Widget>[
SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,),
ObjectivePage(changePageViewIndex: changePageViewIndex,mySelectedExamination:mySelectedExamination),
AssessmentPage(changePageViewIndex: changePageViewIndex,),
AssessmentPage(changePageViewIndex: changePageViewIndex,mySelectedAssessment:mySelectedAssessment),
PlanPage(changePageViewIndex: changePageViewIndex,)
],
),

@ -1,11 +1,16 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.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/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -14,8 +19,10 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class AssessmentPage extends StatefulWidget {
final Function changePageViewIndex;
final MySelectedAssessment mySelectedAssessment;
AssessmentPage({Key key, this.changePageViewIndex});
AssessmentPage(
{Key key, this.changePageViewIndex, this.mySelectedAssessment});
@override
_AssessmentPageState createState() => _AssessmentPageState();
@ -33,61 +40,64 @@ class _AssessmentPageState extends State<AssessmentPage> {
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 30,
),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts('ASSESSMENT',
variant: isAssessmentExpand ? "bodyText" : '',
bold: isAssessmentExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isAssessmentExpand = !isAssessmentExpand;
});
},
child: Icon(isAssessmentExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(children: [
return BaseView<SOAPViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 20,
height: 30,
),
Column(
children: [
Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
child: TextFields(
hintText: "Add ASSESSMENT",
fontSize: 13.5,
onTapTextFields: () {
openAssessmentDialog(context);
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts('ASSESSMENT',
variant:
isAssessmentExpand ? "bodyText" : '',
bold: isAssessmentExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isAssessmentExpand = !isAssessmentExpand;
});
},
child: Icon(isAssessmentExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(children: [
SizedBox(
height: 20,
),
Column(
children: [
Container(
margin:
EdgeInsets.only(left: 5, right: 5, top: 15),
child: TextFields(
hintText: "Add ASSESSMENT",
fontSize: 13.5,
onTapTextFields: () {
openAssessmentDialog(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
@ -96,184 +106,247 @@ class _AssessmentPageState extends State<AssessmentPage> {
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
if(widget.mySelectedAssessment != null &&
widget.mySelectedAssessment
.appointmentId !=
null && widget.mySelectedAssessment
.selectedDiagnosisType != null &&
widget.mySelectedAssessment
.selectedDiagnosisCondition != null)
Container(
margin: EdgeInsets.only(
left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment
.spaceBetween,
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment
.start,
children: [
Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Appointment #: ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.mySelectedAssessment
.appointmentId
.toString(),
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn,
fontWeight: FontWeight.bold,
fontSize: 16,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Type : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.mySelectedAssessment
.selectedDiagnosisType
.nameEn,
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Doc : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah",
fontSize: 10,
color: Colors.grey,
),
],
),
SizedBox(
height: 6,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
AppText(
"Some short remark about the allergy",
fontSize: 10,
color: Colors.grey,
),
],
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
children: [
AppText(
"ICD: ".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"R07.1".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
children: [
InkWell(
onTap: () {},
child: Icon(EvaIcons
.edit2Outline),
)
],
),
],
),
)
],
)
]),
isExpand: isAssessmentExpand,
),
DividerWithSpacesAround(
height: 30,
),
AppButton(
title: TranslationBase
.of(context)
.next,
onPressed: () {
widget.changePageViewIndex(3);
},
),
SizedBox(
height: 20,
height: 30,
),
Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Appointment #: ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"2019054946",
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Typhoid Fever",
fontWeight: FontWeight.bold,
fontSize: 16,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Type : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Possible Diagnosis",
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Doc : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah",
fontSize: 10,
color: Colors.grey,
),
],
),
SizedBox(
height: 6,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
AppText(
"Some short remark about the allergy",
fontSize: 10,
color: Colors.grey,
),
],
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"ICD: ".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"R07.1".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
children: [
InkWell(
onTap: () {},
child: Icon(EvaIcons.edit2Outline),
)
],
),
],
),
)
],
)
]),
isExpand: isAssessmentExpand,
),
DividerWithSpacesAround(
height: 30,
),
AppButton(
title: TranslationBase.of(context).next,
onPressed: () {
widget.changePageViewIndex(3);
},
),
SizedBox(
height: 30,
),
),
),
],
),
),
),
));
)));
}
openAssessmentDialog(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
context: context,
builder: (context) {
return AddAssessmentDetails(
mySelectedAssessment: widget.mySelectedAssessment,
addSelectedAssessment: () {
setState(() {
Navigator.of(context).pop();
});
});
});
}
}
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
final Function() addSelectedAssessment;
const AddAssessmentDetails(
{Key key, this.mySelectedAssessment, this.addSelectedAssessment})
: super(key: key);
@override
_AddAssessmentDetailsState createState() => _AddAssessmentDetailsState();
}
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
MasterKeyModel _selectedDiagnosisCondition;
MasterKeyModel _selectedDiagnosisType;
TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController(
text: "234567");
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery
.of(context)
.size;
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown) {
//TODO: make one Input InputDecoration for all
return InputDecoration(
focusedBorder: OutlineInputBorder(
@ -296,199 +369,237 @@ class _AssessmentPageState extends State<AssessmentPage> {
),
);
}
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
context: context,
builder: (context) {
return FractionallySizedBox(
heightFactor: 0.75,
widthFactor: 0.9,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
"Add Assessment Details".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
return FractionallySizedBox(
heightFactor: 0.75,
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
}
if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
},
builder: (_, model, w) =>
AppScaffold(
baseViewModel: model,
isShowAppBar: false,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
"Add Assessment Details".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Appointment Number",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
readOnly: true,
controller: appointmentIdController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisCondition !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisCondition =
selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
_selectedDiagnosisCondition != null
? _selectedDiagnosisCondition
.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisCondition !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
_selectedDiagnosisCondition != null
? _selectedDiagnosisCondition
.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisType != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisType,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisType =
selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisType =
_selectedDiagnosisType;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Type",
_selectedDiagnosisType != null
? _selectedDiagnosisType.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Remarks",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
controller: remarkController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
AppButton(
title: "Add".toUpperCase(),
onPressed: () {
setState(() {
// model.getDoctorBranch().then((value) {
// _selectedBranch = value;
// if (_referTo['id'] == 1) {
// model.getClinics(
// _selectedBranch['ID']);
// }
// });
widget.mySelectedAssessment.remark =
remarkController.text;
widget.mySelectedAssessment
.appointmentId = int.parse(
appointmentIdController.text);
widget.addSelectedAssessment();
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Appointment Number",
_referTo != null ? _referTo['name'] : null,
true),
enabled: false,
),
),
),
])),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration("Name or ICD",
_referTo != null ? _referTo['name'] : null, true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration("Condition",
_referTo != null ? _referTo['name'] : null, true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration("Type",
_referTo != null ? _referTo['name'] : null, true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Remarks",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 8,
controller: remarksController,
validator: (value) {
if (value == null)
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
AppButton(
title: "Add".toUpperCase(),
onPressed: () {},
),
])),
);
});
),
))),
);
}
}

Loading…
Cancel
Save