Improve Stack docs (#8312)

Discuss how to change paint order.
This commit is contained in:
Adam Barth 2017-02-21 14:14:25 -08:00 committed by GitHub
parent addcb1f7af
commit 434d6c3ff8

View File

@ -1461,6 +1461,13 @@ class BlockBody extends MultiChildRenderObjectWidget {
/// placed relative to the stack according to their top, right, bottom, and left /// placed relative to the stack according to their top, right, bottom, and left
/// properties. /// properties.
/// ///
/// The stack paints its children in order. If you want to change the order in
/// which the children paint, you can rebuild the stack with the children in
/// the new order. If you reorder the children in this way, consider giving the
/// children non-null keys. These keys will cause the framework to move the
/// underlying objects for the children to their new locations rather than
/// recreate them at their new location.
///
/// For more details about the stack layout algorithm, see [RenderStack]. /// For more details about the stack layout algorithm, see [RenderStack].
/// ///
/// If you want to lay a number of children out in a particular pattern, or if /// If you want to lay a number of children out in a particular pattern, or if