mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +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:
@@ -15,8 +15,10 @@ Future<List<Sample>> getSamples() async {
|
||||
var cookbookFile = File('lib/src/cookbook.json');
|
||||
var contents = await yamlFile.readAsString();
|
||||
var cookbookContents = await cookbookFile.readAsString();
|
||||
var index = checkedYamlDecode(contents, (m) => Index.fromJson(m),
|
||||
var index = checkedYamlDecode(
|
||||
contents, (m) => m != null ? Index.fromJson(m) : null,
|
||||
sourceUrl: yamlFile.uri);
|
||||
if (index == null) throw('unable to get load from ${yamlFile.uri}');
|
||||
var cookbookIndex =
|
||||
Index.fromJson(json.decode(cookbookContents) as Map<dynamic, dynamic>);
|
||||
return index.samples..addAll(cookbookIndex.samples);
|
||||
|
||||
Reference in New Issue
Block a user