fix debug mode error and format
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
erinn 2021-05-18 18:23:07 -07:00
parent 5714713dab
commit e0a031c6d3
1 changed files with 15 additions and 11 deletions

View File

@ -57,10 +57,11 @@ class _ContactsViewState extends State<ContactsView> {
// need both conditions for displaying initial empty textfield and also allowing filters to be cleared if this widget gets lost/reset
icon: Icon(showSearchBar || Provider.of<ContactListState>(context).isFiltered ? Icons.search_off : Icons.search),
onPressed: () {
Provider.of<ContactListState>(context).filter = "";
setState((){showSearchBar = !showSearchBar;});
}
)
Provider.of<ContactListState>(context, listen: false).filter = "";
setState(() {
showSearchBar = !showSearchBar;
});
})
],
),
floatingActionButton: FloatingActionButton(
@ -74,7 +75,10 @@ class _ContactsViewState extends State<ContactsView> {
Widget _buildFilterable() {
//todo: translate
Widget txtfield = CwtchTextField(controller: ctrlrFilter, labelText: AppLocalizations.of(context).search, onChanged: (newVal){
Widget txtfield = CwtchTextField(
controller: ctrlrFilter,
labelText: AppLocalizations.of(context).search,
onChanged: (newVal) {
Provider.of<ContactListState>(context, listen: false).filter = newVal;
});
return Column(children: [Padding(padding: EdgeInsets.all(2), child: txtfield), Expanded(child: _buildContactList())]);