Commit 616c6d79 authored by Adam Barth's avatar Adam Barth

LayoutId should default to using its id as its key

This default seems likely to be benefitial because typically the LayoutIds
coorespond to semantic slots in a bespoke layout.
parent c014fd37
...@@ -304,9 +304,10 @@ class LayoutId extends ParentDataWidget { ...@@ -304,9 +304,10 @@ class LayoutId extends ParentDataWidget {
LayoutId({ LayoutId({
Key key, Key key,
Widget child, Widget child,
this.id Object id
}) : super(key: key, child: child) { }) : id = id, super(key: key ?? new ValueKey(id), child: child) {
assert(child != null); assert(child != null);
assert(id != null);
} }
final Object id; final Object id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment