Skip to content

Commit 0421b4f

Browse files
authored
Improve docs for Center (flutter#8522)
Fixes flutter#8478
1 parent d579d58 commit 0421b4f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/flutter/lib/src/widgets/basic.dart

+8
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,14 @@ class Align extends SingleChildRenderObjectWidget {
710710

711711
/// A widget that centers its child within itself.
712712
///
713+
/// This widget will be as big as possible if its dimensions are constrained and
714+
/// [widthFactor] and [heightFactor] are null. If a dimension is unconstrained
715+
/// and the corresponding size factor is null then the widget will match its
716+
/// child's size in that dimension. If a size factor is non-null then the
717+
/// corresponding dimension of this widget will be the product of the child's
718+
/// dimension and the size factor. For example if widthFactor is 2.0 then
719+
/// the width of this widget will always be twice its child's width.
720+
///
713721
/// See also:
714722
///
715723
/// * [Align], which lets you arbitrarily position a child within itself,

0 commit comments

Comments
 (0)