Answers for "searchQueryBuilder: (query, list) flutter"

0

searchQueryBuilder: (query, list) flutter

if (text.length > 1) {
  setState(() {
    tempSearchStore = _listPkh.documents.where((d) {
      if (d['nama'].toLowerCase().indexOf(text) > -1) {
        return true;
      } else if (d['alamat'].toLowerCase().indexOf(text) > -1) {
        return true;
      }
      return false;
    }).toList();
  });
} else {
  setState(() {
    tempSearchStore = _listPkh.documents;
  });
}
Posted by: Guest on November-21-2020

Browse Popular Code Answers by Language