[story_shell_labs] fix crash on edit layout w/suggestions
Change-Id: I71316c43f27de4cf045737ef4e5d24ea39eb2bc1
diff --git a/public/dart/story_shell_labs/lib/src/layout/tile_presenter/tile_presenter_suggestions_widget.dart b/public/dart/story_shell_labs/lib/src/layout/tile_presenter/tile_presenter_suggestions_widget.dart
index c41d722..e874e09 100644
--- a/public/dart/story_shell_labs/lib/src/layout/tile_presenter/tile_presenter_suggestions_widget.dart
+++ b/public/dart/story_shell_labs/lib/src/layout/tile_presenter/tile_presenter_suggestions_widget.dart
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import 'package:flutter/material.dart';
+import 'package:story_shell_labs_lib/layout/tile_model.dart';
import 'package:tiler/tiler.dart';
import '../tile_model/module_info.dart';
@@ -33,9 +34,12 @@
stream: presenter.suggestionsUpdate,
initialData: presenter.currentSuggestionsState,
builder: (context, snapshot) => Row(
- mainAxisSize: MainAxisSize.min,
- children: snapshot.data.models.map(_buildSuggestion).toList(),
- ),
+ mainAxisSize: MainAxisSize.min,
+ children: snapshot.data.models
+ .map(cloneTiler)
+ .map(_buildSuggestion)
+ .toList(),
+ ),
);
Widget _buildSuggestion(TilerModel<ModuleInfo> model) => Padding(