mirror of
https://github.com/flutter/samples.git
synced 2025-11-12 15:58:32 +00:00
Implement case insensitive search in the samples index (#1518)
Closes #1517
This commit is contained in:
@@ -6,8 +6,11 @@ bool matchesQuery(String query, String sampleAttributes) {
|
||||
if (query.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
var queryWords = query.split(' ')..removeWhere((s) => s.isEmpty);
|
||||
var attributes = sampleAttributes.split(' ')..removeWhere((s) => s.isEmpty);
|
||||
|
||||
var queryWords = query.toLowerCase().split(' ')
|
||||
..removeWhere((s) => s.isEmpty);
|
||||
var attributes = sampleAttributes.toLowerCase().split(' ')
|
||||
..removeWhere((s) => s.isEmpty);
|
||||
|
||||
// Test for type filter
|
||||
// This will check whether a type parameter is present in the
|
||||
|
||||
Reference in New Issue
Block a user