WD: Add any input typed as chief complaint

update_flutter_3.24_vida_plus_episode_MDS
taha.alam 11 months ago
parent 09480bc994
commit 5ecee03052

@ -259,28 +259,51 @@ class _ComplaintSelectionState extends State<ComplaintSelection> {
textAlign: TextAlign.start,
),
),
SizedBox(height: 8,),
Row(children: [
Expanded(child: Padding(
padding: EdgeInsets.only(left: 10,right: 10),
child:
TextFormField(
autofocus: true,
controller: searchController,
decoration: InputDecoration(
hintText: '',
border: InputBorder.none,
isCollapsed: true,
suffixIcon: model.state == ViewState.BusyLocal ?Transform.scale(
scale: 0.5,
child: CircularProgressIndicator(strokeWidth: 2,) ,): SizedBox()
),
onChanged: _onTextChanged,)
),)
],),
SizedBox(
height: 8,
),
Row(
children: [
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 10, right: 10),
child: TextFormField(
autofocus: true,
controller: searchController,
textInputAction: TextInputAction.done,
decoration: InputDecoration(
hintText: '',
border: InputBorder.none,
isCollapsed: true,
suffixIcon: model.state == ViewState.BusyLocal
? Transform.scale(
scale: 0.5,
child: CircularProgressIndicator(
strokeWidth: 2,
),
)
:(searchController.text.isNotEmpty) ?IconButton(
icon: Icon(
Icons.save_as_outlined,
color: Colors.red,
size: 25,
),
onPressed: () {
if(searchController.text.isNotEmpty) {
widget.onSave?.call(searchController.text);
}
}): SizedBox.shrink(),
),
onChanged: _onTextChanged,
onEditingComplete: (){
if(searchController.text.isNotEmpty) {
widget.onSave?.call(searchController.text);
}
},
)),
)
],
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Material(

Loading…
Cancel
Save