1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-06 03:31:03 +00:00

Adds analysis options to Veggie Seasons (#98)

This commit is contained in:
Andrew Brogdon
2019-07-01 10:26:50 -07:00
committed by GitHub
parent 2ec8cc3684
commit 4646f0fc8e
13 changed files with 65 additions and 42 deletions

View File

@@ -69,12 +69,12 @@ class _ColorChangingIconState
}
@override
void forEachTween(visitor) {
void forEachTween(TweenVisitor<dynamic> visitor) {
_colorTween = visitor(
_colorTween,
widget.color,
(dynamic value) => ColorTween(begin: value),
);
(dynamic value) => ColorTween(begin: value as Color),
) as ColorTween;
}
}

View File

@@ -69,7 +69,7 @@ class SettingsGroup extends StatelessWidget {
this.header,
this.footer,
}) : assert(items != null),
assert(items.length > 0);
assert(items.isNotEmpty);
final List<SettingsItem> items;
final Widget header;

View File

@@ -143,7 +143,7 @@ class VeggieCard extends StatelessWidget {
Widget build(BuildContext context) {
return PressableCard(
onPressed: () {
Navigator.of(context).push(CupertinoPageRoute(
Navigator.of(context).push<void>(CupertinoPageRoute(
builder: (context) => DetailsScreen(veggie.id),
fullscreenDialog: true,
));

View File

@@ -68,7 +68,7 @@ class VeggieHeadline extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => Navigator.of(context).push(CupertinoPageRoute(
onTap: () => Navigator.of(context).push<void>(CupertinoPageRoute(
builder: (context) => DetailsScreen(veggie.id),
fullscreenDialog: true,
)),