|
|
|
|
@ -59,22 +59,49 @@ class _DynamicElementsState extends State<DynamicElements> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final screenSize = MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size;
|
|
|
|
|
InputDecoration textFieldSelectorDecoration({String hintText,
|
|
|
|
|
String selectedText, bool isDropDown,IconData icon}) {
|
|
|
|
|
return InputDecoration(
|
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
),
|
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
),
|
|
|
|
|
disabledBorder: OutlineInputBorder(
|
|
|
|
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
),
|
|
|
|
|
hintText: selectedText != null ? selectedText : hintText,
|
|
|
|
|
suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null,
|
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Colors.grey.shade600,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
return LayoutBuilder(
|
|
|
|
|
builder: (ctx, constraints) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
onTap: ()=> _presentDatePicker('_selectedFromDate'),
|
|
|
|
|
hintText: TranslationBase.of(context).fromDate,
|
|
|
|
|
controller: _fromDateController,
|
|
|
|
|
inputFormatter: ONLY_DATE,
|
|
|
|
|
onTap: () {
|
|
|
|
|
_presentDatePicker('_selectedFromDate');
|
|
|
|
|
},
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
if (_fromDateController.text.toString().trim().isEmpty) {
|
|
|
|
|
widget._patientSearchFormValues.From = "0";
|
|
|
|
|
@ -82,12 +109,14 @@ class _DynamicElementsState extends State<DynamicElements> {
|
|
|
|
|
widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
readOnly: true,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
readOnly: true,
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.toDate,
|
|
|
|
|
|