From bafd2c20c67d9ad9cab72c8b254e62dcb08051a6 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 24 Mar 2016 12:57:38 -0700 Subject: [PATCH] Improve docs for SizedBox Fixes #2873 --- packages/flutter/lib/src/widgets/basic.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 07d64345d5..fb30af03ad 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -560,8 +560,13 @@ class CustomMultiChildLayout extends MultiChildRenderObjectWidget { /// A box with a specified size. /// -/// Forces its child to have a specific width and/or height and sizes itself to -/// match the size of its child. +/// If given a child, this widget forces its child to have a specific width +/// and/or height (assuming values are permitted by this widget's parent). If +/// either the width or height is null, this widget will size itself to match +/// the child's size in that dimension. +/// +/// If not given a child, this widget will size itself to the given width and +/// height, treating nulls as zero. class SizedBox extends SingleChildRenderObjectWidget { SizedBox({ Key key, this.width, this.height, Widget child }) : super(key: key, child: child);