mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #1783 from Hixie/better-feedback-for-null-child
better feedback for null child to a Block or Column
This commit is contained in:
commit
6684b16599
@ -272,8 +272,10 @@ abstract class OneChildRenderObjectWidget extends RenderObjectWidget {
|
||||
/// storage for that child list, it doesn't actually provide the updating
|
||||
/// logic.)
|
||||
abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
|
||||
const MultiChildRenderObjectWidget({ Key key, this.children })
|
||||
: super(key: key);
|
||||
MultiChildRenderObjectWidget({ Key key, this.children })
|
||||
: super(key: key) {
|
||||
assert(!children.any((Widget child) => child == null));
|
||||
}
|
||||
|
||||
final List<Widget> children;
|
||||
|
||||
|
||||
@ -384,7 +384,9 @@ class Block extends StatelessComponent {
|
||||
this.initialScrollOffset,
|
||||
this.scrollDirection: ScrollDirection.vertical,
|
||||
this.onScroll
|
||||
}) : super(key: key);
|
||||
}) : super(key: key) {
|
||||
assert(!children.any((Widget child) => child == null));
|
||||
}
|
||||
|
||||
final List<Widget> children;
|
||||
final double initialScrollOffset;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user