| Index: samples/swarm/swarm_ui_lib/layout/GridLayout.dart
|
| diff --git a/samples/swarm/swarm_ui_lib/layout/GridLayout.dart b/samples/swarm/swarm_ui_lib/layout/GridLayout.dart
|
| index e20d2d8138d0c0c4090ca8781b86ab786b8ac7ab..41ec8f38a989e81b61a84b56241dc25c10f6a496 100644
|
| --- a/samples/swarm/swarm_ui_lib/layout/GridLayout.dart
|
| +++ b/samples/swarm/swarm_ui_lib/layout/GridLayout.dart
|
| @@ -152,7 +152,9 @@ class GridLayout extends ViewLayout {
|
| void _computeUsedBreadthOfTracks(List<GridTrack> tracks) {
|
|
|
| // TODO(jmesserly): as a performance optimization we could cache this
|
| - final items = CollectionUtils.mappedBy(view.childViews, (view_) => view_.layout);
|
| + final items = view.childViews
|
| + .mappedBy((view_) => view_.layout)
|
| + .toList();
|
| CollectionUtils.sortBy(items, (item) => _getSpanCount(item));
|
|
|
| // 1. Initialize per Grid Track variables
|
| @@ -418,7 +420,7 @@ class GridLayout extends ViewLayout {
|
| * run before the track sizing algorithm.
|
| */
|
| void _ensureAllTracks() {
|
| - final items = CollectionUtils.mappedBy(view.childViews, (view_) => view_.layout);
|
| + final items = view.childViews.mappedBy((view_) => view_.layout);
|
|
|
| for (final child in items) {
|
| if (child.layoutParams == null) {
|
| @@ -435,7 +437,7 @@ class GridLayout extends ViewLayout {
|
| * Given the track sizes that were computed, position children in the grid.
|
| */
|
| void _setBoundsOfChildren() {
|
| - final items = CollectionUtils.mappedBy(view.childViews, (view_) => view_.layout);
|
| + final items = view.childViews.mappedBy((view_) => view_.layout);
|
|
|
| for (final item in items) {
|
| GridLayoutParams childLayout = item.layoutParams;
|
|
|