1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-27 23:01:59 +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

@@ -12,9 +12,9 @@ Index _$IndexFromJson(Map json) {
$checkedConvert(
json,
'samples',
(v) => (v as List)
?.map((e) => e == null ? null : Sample.fromJson(e as Map))
?.toList()),
(v) => (v as List<dynamic>)
.map((e) => Sample.fromJson(e as Map))
.toList()),
);
return val;
});
@@ -28,35 +28,35 @@ Sample _$SampleFromJson(Map json) {
return $checkedNew('Sample', json, () {
final val = Sample(
name: $checkedConvert(json, 'name', (v) => v as String),
author: $checkedConvert(json, 'author', (v) => v as String),
author: $checkedConvert(json, 'author', (v) => v as String?),
screenshots: $checkedConvert(
json,
'screenshots',
(v) => (v as List)
?.map((e) => e == null ? null : Screenshot.fromJson(e as Map))
?.toList()),
(v) => (v as List<dynamic>)
.map((e) => Screenshot.fromJson(e as Map))
.toList()),
source: $checkedConvert(json, 'source', (v) => v as String),
web: $checkedConvert(json, 'web', (v) => v as String),
web: $checkedConvert(json, 'web', (v) => v as String?),
description: $checkedConvert(json, 'description', (v) => v as String),
difficulty: $checkedConvert(json, 'difficulty', (v) => v as String),
difficulty: $checkedConvert(json, 'difficulty', (v) => v as String?),
widgets: $checkedConvert(json, 'widgets',
(v) => (v as List)?.map((e) => e as String)?.toList()),
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
packages: $checkedConvert(json, 'packages',
(v) => (v as List)?.map((e) => e as String)?.toList()),
tags: $checkedConvert(
json, 'tags', (v) => (v as List)?.map((e) => e as String)?.toList()),
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
tags: $checkedConvert(json, 'tags',
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
platforms: $checkedConvert(json, 'platforms',
(v) => (v as List)?.map((e) => e as String)?.toList()),
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
links: $checkedConvert(
json,
'links',
(v) => (v as List)
?.map((e) => e == null ? null : Link.fromJson(e as Map))
?.toList()),
(v) => (v as List<dynamic>)
.map((e) => Link.fromJson(e as Map))
.toList()),
type: $checkedConvert(json, 'type', (v) => v as String),
date: $checkedConvert(
json, 'date', (v) => v == null ? null : DateTime.parse(v as String)),
channel: $checkedConvert(json, 'channel', (v) => v as String),
channel: $checkedConvert(json, 'channel', (v) => v as String?),
);
return val;
});