From e9edf7a0af72be990dc5892f5bd05b0129cd25b0 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Thu, 16 Jun 2016 10:47:48 -0700 Subject: [PATCH] Update LayoutBuilder docs a bit (#4593) --- packages/flutter/lib/src/widgets/layout_builder.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/flutter/lib/src/widgets/layout_builder.dart b/packages/flutter/lib/src/widgets/layout_builder.dart index 339290b595..5b15eb729b 100644 --- a/packages/flutter/lib/src/widgets/layout_builder.dart +++ b/packages/flutter/lib/src/widgets/layout_builder.dart @@ -18,6 +18,16 @@ typedef Widget LayoutWidgetBuilder(BuildContext context, BoxConstraints constrai /// is useful when the parent constrains the child's size and doesn't depend on /// the child's intrinsic size. The LayoutBuilder's final size will match its /// child's size. +/// +/// If the child should be smaller than the parent, consider wrapping the child +/// in an [Align] widget. If the child might want to be bigger, consider +/// wrapping it in a [ScrollableViewport]. +/// +/// See also: +/// +/// * [Builder], which calls a `builder` function at build time. +/// * [StatefulBuilder], which passes its `builder` function a `setState` callback. +/// * [CustomSingleChildLayout], which positions its child during layout. class LayoutBuilder extends RenderObjectWidget { /// Creates a widget that defers its building until layout. ///