1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-12 15:58:32 +00:00

Fix sample index deployment action (#862)

* Update sample index dependencies

* Update to tuneup 0.3.8, update dependencies

* Upgrade to null safety, lock sass version

* fix analyzer warnings

* Fix unit tests

* Fix issues from upgrading to null safety
This commit is contained in:
John Ryan
2021-08-02 15:41:18 -07:00
committed by GitHub
parent 699cc3a8c5
commit 7de8fafcee
17 changed files with 153 additions and 102 deletions

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file
bool matchesQuery(String query, String sampleAttributes) {
if (query == null || query.isEmpty) {
if (query.isEmpty) {
return true;
}
var queryWords = query.split(' ')..removeWhere((s) => s.isEmpty);
@@ -68,11 +68,13 @@ String searchQueryFromParams(Map<String, String> params) {
}
if (params.containsKey('type')) {
if (buf.isNotEmpty) buf.write(' ');
buf.write('type:' + params['type']);
var value = params['type'];
if (value != null) buf.write('type:' + value);
}
if (params.containsKey('platform')) {
if (buf.isNotEmpty) buf.write(' ');
buf.write('platform:' + params['platform']);
var value = params['platform'];
if (value != null) buf.write('platform:' + value);
}
return buf.toString();