|
|
|
|
@ -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(
|
|
|
|
|
|