mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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.
This commit is contained in:
parent
c014fd3702
commit
616c6d7918
@ -304,9 +304,10 @@ class LayoutId extends ParentDataWidget {
|
||||
LayoutId({
|
||||
Key key,
|
||||
Widget child,
|
||||
this.id
|
||||
}) : super(key: key, child: child) {
|
||||
Object id
|
||||
}) : id = id, super(key: key ?? new ValueKey(id), child: child) {
|
||||
assert(child != null);
|
||||
assert(id != null);
|
||||
}
|
||||
|
||||
final Object id;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user