Skip to content

Commit

Permalink
Merge pull request #4 from emem365/FixSearch
Browse files Browse the repository at this point in the history
FixSearch
  • Loading branch information
emem365 authored Aug 20, 2020
2 parents f0d3b27 + 3d255dd commit e2d67eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/util/sources_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class SourcesSearch extends SearchDelegate {
final _database = locator<PersistentDatabase>();
if (query == '') return Center(child: Text('Enter keyword'));
List results = sources
.where((element) => element.name.contains(query))
.where((element) =>
element.name.toLowerCase().contains(query.toLowerCase()))
.toList();
if (results.length == 0)
return Align(
Expand Down Expand Up @@ -67,7 +68,8 @@ class SourcesSearch extends SearchDelegate {
final sources = Provider.of<SourcesPageController>(context).sources;
if (query == '') return Center(child: Text('Enter keyword'));
List results = sources
.where((element) => element.name.contains(query))
.where((element) =>
element.name.toLowerCase().contains(query.toLowerCase()))
.map<Widget>(
(source) => ListTile(
title: Text(source.name),
Expand Down

0 comments on commit e2d67eb

Please sign in to comment.