Ban sync*/async* from user facing code (#95050)

This commit is contained in:
Dan Field
2021-12-12 13:05:03 -08:00
committed by GitHub
parent 895beb04bb
commit ab0a335973
55 changed files with 656 additions and 580 deletions

View File

@@ -48,9 +48,9 @@ class CastListState extends State<CastList> {
const Actor('James Madison', 'JM'),
];
Iterable<Widget> get actorWidgets sync* {
for (final Actor actor in _cast) {
yield Padding(
Iterable<Widget> get actorWidgets {
return _cast.map((Actor actor) {
return Padding(
padding: const EdgeInsets.all(4.0),
child: Chip(
avatar: CircleAvatar(child: Text(actor.initials)),
@@ -64,7 +64,7 @@ class CastListState extends State<CastList> {
},
),
);
}
});
}
@override