File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class _ListComponent extends react.Component {
169169 @override
170170 render () {
171171 final items = [];
172- for (final item in state['items' ]) {
172+ for (final item in state['items' ] as List ) {
173173 items.add (react.li ({'key' : item}, '$item ' ));
174174 }
175175
@@ -473,7 +473,7 @@ class _Component2TestComponent extends react.Component2 with react.TypedSnapshot
473473 // Used to generate unique keys even when the list contains duplicate items
474474 final itemCounts = < dynamic , int > {};
475475 final items = [];
476- for (final item in state['items' ]) {
476+ for (final item in state['items' ] as List ) {
477477 final count = itemCounts[item] = (itemCounts[item] ?? 0 ) + 1 ;
478478 items.add (react.li ({'key' : 'c2-$item -$count ' }, '$item ' ));
479479 }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class _Hello extends react.Component {
5353 @override
5454 render () {
5555 timeprint ('rendering start' );
56- final data = props['data' ];
56+ final data = props['data' ] as List ;
5757 final children = [];
5858 for (final elem in data) {
5959 children.add (react.div ({
You can’t perform that action at this time.
0 commit comments