Skip to content

Commit ac96f74

Browse files
committed
Merge pull request flutter#765 from abarth/layout_id_key
LayoutId should default to using its id as its key
2 parents c014fd3 + 616c6d7 commit ac96f74

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/flutter/lib/src/widgets/basic.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,10 @@ class LayoutId extends ParentDataWidget {
304304
LayoutId({
305305
Key key,
306306
Widget child,
307-
this.id
308-
}) : super(key: key, child: child) {
307+
Object id
308+
}) : id = id, super(key: key ?? new ValueKey(id), child: child) {
309309
assert(child != null);
310+
assert(id != null);
310311
}
311312

312313
final Object id;

0 commit comments

Comments
 (0)