Commit 1a05b696 authored by Hans Muller's avatar Hans Muller

Doc update (#4234)

parent f544abd0
...@@ -486,15 +486,16 @@ class Padding extends SingleChildRenderObjectWidget { ...@@ -486,15 +486,16 @@ class Padding extends SingleChildRenderObjectWidget {
/// and the corresponding size factor is null then the widget will match its /// and the corresponding size factor is null then the widget will match its
/// child's size in that dimension. If a size factor is non-null then the /// child's size in that dimension. If a size factor is non-null then the
/// corresponding dimension of this widget will be the product of the child's /// corresponding dimension of this widget will be the product of the child's
/// dimension and the size factor. For example if widthFactor is 0.5 then /// dimension and the size factor. For example if widthFactor is 2.0 then
/// the width of this widget will always be half of the child's width. /// the width of this widget will always be twice its child's width.
/// ///
/// See also: /// See also:
/// ///
/// * [CustomSingleChildLayout] /// * [CustomSingleChildLayout]
/// * [Center] (which is the same as [Align] but with the [alignment] always /// * [Center] (which is the same as [Align] but with the [alignment] always
/// set to [FractionalOffset.center]) /// set to [FractionalOffset.center])
/// * [FractionallySizedBox] which sizes its child based on its own size. /// * [FractionallySizedBox] (which sizes its child based on a fraction of its own
/// size and positions the child according to a [FractionalOffset] value)
class Align extends SingleChildRenderObjectWidget { class Align extends SingleChildRenderObjectWidget {
/// Creates an alignment widget. /// Creates an alignment widget.
/// ///
...@@ -574,7 +575,10 @@ class Center extends Align { ...@@ -574,7 +575,10 @@ class Center extends Align {
/// See also: /// See also:
/// ///
/// * [SingleChildLayoutDelegate] /// * [SingleChildLayoutDelegate]
/// * [Align] (which positions a single child according to a [FractionalOffset]) /// * [Align] (which sizes itself based on its child's size and positions
/// the child according to a [FractionalOffset] value)
/// * [FractionallySizedBox] (which sizes its child based on a fraction of its own
/// size and positions the child according to a [FractionalOffset] value)
/// * [CustomMultiChildLayout] (which uses a delegate to position multiple /// * [CustomMultiChildLayout] (which uses a delegate to position multiple
/// children) /// children)
class CustomSingleChildLayout extends SingleChildRenderObjectWidget { class CustomSingleChildLayout extends SingleChildRenderObjectWidget {
...@@ -602,6 +606,8 @@ class CustomSingleChildLayout extends SingleChildRenderObjectWidget { ...@@ -602,6 +606,8 @@ class CustomSingleChildLayout extends SingleChildRenderObjectWidget {
} }
/// Metadata for identifying children in a [CustomMultiChildLayout]. /// Metadata for identifying children in a [CustomMultiChildLayout].
/// The [MultiChildLayoutDelegate] hasChild, layoutChild, and positionChild
/// methods use these identifiers.
class LayoutId extends ParentDataWidget<CustomMultiChildLayout> { class LayoutId extends ParentDataWidget<CustomMultiChildLayout> {
/// Marks a child with a layout identifier. /// Marks a child with a layout identifier.
/// ///
...@@ -649,7 +655,7 @@ const List<Widget> _emptyWidgetList = const <Widget>[]; ...@@ -649,7 +655,7 @@ const List<Widget> _emptyWidgetList = const <Widget>[];
/// See also: /// See also:
/// ///
/// * [MultiChildLayoutDelegate] /// * [MultiChildLayoutDelegate]
/// * [CustomSingleChildLayout] /// * [CustomSingleChildLayout] (which defers the layout of its single child to a delegate)
/// * [Stack] /// * [Stack]
/// * [Flow] /// * [Flow]
class CustomMultiChildLayout extends MultiChildRenderObjectWidget { class CustomMultiChildLayout extends MultiChildRenderObjectWidget {
...@@ -750,11 +756,12 @@ class ConstrainedBox extends SingleChildRenderObjectWidget { ...@@ -750,11 +756,12 @@ class ConstrainedBox extends SingleChildRenderObjectWidget {
} }
} }
/// An overflow box that sizes its child to a fraction of the total available space. /// Sizes its child to a fraction of the total available space.
/// For more details about the layout algorithm, see [RenderFractionallySizedOverflowBox]. /// For more details about the layout algorithm, see [RenderFractionallySizedOverflowBox].
/// ///
/// See also: /// See also:
/// * [Align] which can size itself based on its child's size. /// * [Align] (which sizes itself based on its child's size and positions
/// the child according to a [FractionalOffset] value)
/// * [OverflowBox] /// * [OverflowBox]
class FractionallySizedBox extends SingleChildRenderObjectWidget { class FractionallySizedBox extends SingleChildRenderObjectWidget {
FractionallySizedBox({ FractionallySizedBox({
...@@ -773,7 +780,7 @@ class FractionallySizedBox extends SingleChildRenderObjectWidget { ...@@ -773,7 +780,7 @@ class FractionallySizedBox extends SingleChildRenderObjectWidget {
/// incoming width constraint multipled by this factor. /// incoming width constraint multipled by this factor.
final double widthFactor; final double widthFactor;
/// If non-null, the fraction of the incoming height to give to the child. /// If non-null, the fraction of the incoming height given to the child.
/// ///
/// If non-null, the child is given a tight height constraint that is the max /// If non-null, the child is given a tight height constraint that is the max
/// incoming height constraint multipled by this factor. /// incoming height constraint multipled by this factor.
...@@ -1361,7 +1368,8 @@ abstract class StackRenderObjectWidgetBase extends MultiChildRenderObjectWidget ...@@ -1361,7 +1368,8 @@ abstract class StackRenderObjectWidgetBase extends MultiChildRenderObjectWidget
/// See also: /// See also:
/// ///
/// * [Flow] /// * [Flow]
/// * [Align] (which positions a single child according to a [FractionalOffset]) /// * [Align] (which sizes itself based on its child's size and positions
/// the child according to a [FractionalOffset] value)
/// * [CustomSingleChildLayout] /// * [CustomSingleChildLayout]
/// * [CustomMultiChildLayout] /// * [CustomMultiChildLayout]
class Stack extends StackRenderObjectWidgetBase { class Stack extends StackRenderObjectWidgetBase {
......
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