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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
));
|
||||
|
||||
@@ -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,
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user