|
|
|
|
@ -24,25 +24,25 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Container(
|
|
|
|
|
width: widget.width ?? null,
|
|
|
|
|
width: widget.width,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: widget.elementList != null
|
|
|
|
|
? () {
|
|
|
|
|
Utils.hideKeyboard(context);
|
|
|
|
|
ListSelectDialog dialog = ListSelectDialog(
|
|
|
|
|
list: widget.elementList!,
|
|
|
|
|
attributeName: '${widget.keyName}',
|
|
|
|
|
attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}',
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
okFunction: (selectedValue) => widget.okFunction!(selectedValue),
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
// Utils.hideKeyboard(context);
|
|
|
|
|
// ListSelectDialog dialog = ListSelectDialog(
|
|
|
|
|
// list: widget.elementList!,
|
|
|
|
|
// attributeName: '${widget.keyName}',
|
|
|
|
|
// attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}',
|
|
|
|
|
// okText: TranslationBase.of(context).ok,
|
|
|
|
|
// okFunction: (selectedValue) => widget.okFunction!(selectedValue),
|
|
|
|
|
// );
|
|
|
|
|
// showDialog(
|
|
|
|
|
// barrierDismissible: false,
|
|
|
|
|
// context: context,
|
|
|
|
|
// builder: (BuildContext context) {
|
|
|
|
|
// return dialog;
|
|
|
|
|
// },
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
child: AppTextFieldCustom(
|
|
|
|
|
@ -53,9 +53,25 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
|
|
|
|
|
? widget.element['${widget.keyName}']
|
|
|
|
|
: null,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
validationError: widget.elementList!.length != 1 ? widget.elementError! : "",
|
|
|
|
|
validationError: widget.elementList!.length != 1 || widget.elementList!.length!=2 ? widget.elementError : "",
|
|
|
|
|
enabled: false,
|
|
|
|
|
onClick: () {},
|
|
|
|
|
onClick: () {
|
|
|
|
|
Utils.hideKeyboard(context);
|
|
|
|
|
ListSelectDialog dialog = ListSelectDialog(
|
|
|
|
|
list: widget.elementList!,
|
|
|
|
|
attributeName: '${widget.keyName}',
|
|
|
|
|
attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}',
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
okFunction: (selectedValue) => widget.okFunction!(selectedValue),
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
onChanged: (value) {},
|
|
|
|
|
onFieldSubmitted: () {},
|
|
|
|
|
),
|
|
|
|
|
|