Commit 6684b165 authored by Ian Hickson's avatar Ian Hickson

Merge pull request #1783 from Hixie/better-feedback-for-null-child

better feedback for null child to a Block or Column
parents 194255e5 e667b3c0
...@@ -272,8 +272,10 @@ abstract class OneChildRenderObjectWidget extends RenderObjectWidget { ...@@ -272,8 +272,10 @@ abstract class OneChildRenderObjectWidget extends RenderObjectWidget {
/// storage for that child list, it doesn't actually provide the updating /// storage for that child list, it doesn't actually provide the updating
/// logic.) /// logic.)
abstract class MultiChildRenderObjectWidget extends RenderObjectWidget { abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
const MultiChildRenderObjectWidget({ Key key, this.children }) MultiChildRenderObjectWidget({ Key key, this.children })
: super(key: key); : super(key: key) {
assert(!children.any((Widget child) => child == null));
}
final List<Widget> children; final List<Widget> children;
......
...@@ -384,7 +384,9 @@ class Block extends StatelessComponent { ...@@ -384,7 +384,9 @@ class Block extends StatelessComponent {
this.initialScrollOffset, this.initialScrollOffset,
this.scrollDirection: ScrollDirection.vertical, this.scrollDirection: ScrollDirection.vertical,
this.onScroll this.onScroll
}) : super(key: key); }) : super(key: key) {
assert(!children.any((Widget child) => child == null));
}
final List<Widget> children; final List<Widget> children;
final double initialScrollOffset; final double initialScrollOffset;
......
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