From fade43ee5567d8a4d9b5c7a8934a2817501d7b36 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Sun, 31 Jan 2016 23:06:34 -0800 Subject: [PATCH] Update the Align docs They were out-of-date. Fixes #1391 --- packages/flutter/lib/src/rendering/shifted_box.dart | 2 +- packages/flutter/lib/src/widgets/basic.dart | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/rendering/shifted_box.dart b/packages/flutter/lib/src/rendering/shifted_box.dart index e39b3e6a5a..89325a438d 100644 --- a/packages/flutter/lib/src/rendering/shifted_box.dart +++ b/packages/flutter/lib/src/rendering/shifted_box.dart @@ -211,7 +211,7 @@ class RenderPadding extends RenderShiftedBox { /// /// For example, to align a box at the bottom right, you would pass this box a /// tight constraint that is bigger than the child's natural size, -/// with the alignment set to (1.0, 1.0). +/// with an alignment of [const FractionalOffset(1.0, 1.0)]. /// /// By default, sizes to be as big as possible in both axes. If either axis is /// unconstrained, then in that direction it will be sized to fit the child's diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 29552b691d..070dbd7ec1 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -359,7 +359,12 @@ class Padding extends OneChildRenderObjectWidget { /// /// For example, to align a box at the bottom right, you would pass this box a /// tight constraint that is bigger than the child's natural size, -/// with horizontal and vertical set to 1.0. +/// with an alignment of [const FractionalOffset(1.0, 1.0)]. +/// +/// By default, sizes to be as big as possible in both axes. If either axis is +/// unconstrained, then in that direction it will be sized to fit the child's +/// dimensions. Using widthFactor and heightFactor you can force this latter +/// behaviour in all cases. class Align extends OneChildRenderObjectWidget { Align({ Key key,