From 32be39bf16eb814d68d9213bc6f33463b918d8dc Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 18 Jun 2020 13:58:02 -0700 Subject: [PATCH] Fix doc for DecoratedBox (#59791) --- .../flutter/lib/src/widgets/container.dart | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/packages/flutter/lib/src/widgets/container.dart b/packages/flutter/lib/src/widgets/container.dart index f36632ee380..683ad477289 100644 --- a/packages/flutter/lib/src/widgets/container.dart +++ b/packages/flutter/lib/src/widgets/container.dart @@ -46,50 +46,6 @@ import 'image.dart'; /// ``` /// {@end-tool} /// -/// ## Layout behavior -/// -/// _See [BoxConstraints] for an introduction to box layout models._ -/// -/// Since [Container] combines a number of other widgets each with their own -/// layout behavior, [Container]'s layout behavior is somewhat complicated. -/// -/// Summary: [Container] tries, in order: to honor [alignment], to size itself to -/// the [child], to honor the `width`, `height`, and [constraints], to expand to -/// fit the parent, to be as small as possible. -/// -/// More specifically: -/// -/// If the widget has no child, no `height`, no `width`, no [constraints], -/// and the parent provides unbounded constraints, then [Container] tries to -/// size as small as possible. -/// -/// If the widget has no child and no [alignment], but a `height`, `width`, or -/// [constraints] are provided, then the [Container] tries to be as small as -/// possible given the combination of those constraints and the parent's -/// constraints. -/// -/// If the widget has no child, no `height`, no `width`, no [constraints], and -/// no [alignment], but the parent provides bounded constraints, then -/// [Container] expands to fit the constraints provided by the parent. -/// -/// If the widget has an [alignment], and the parent provides unbounded -/// constraints, then the [Container] tries to size itself around the child. -/// -/// If the widget has an [alignment], and the parent provides bounded -/// constraints, then the [Container] tries to expand to fit the parent, and -/// then positions the child within itself as per the [alignment]. -/// -/// Otherwise, the widget has a [child] but no `height`, no `width`, no -/// [constraints], and no [alignment], and the [Container] passes the -/// constraints from the parent to the child and sizes itself to match the -/// child. -/// -/// The [margin] and [padding] properties also affect the layout, as described -/// in the documentation for those properties. (Their effects merely augment the -/// rules described above.) The [decoration] can implicitly increase the -/// [padding] (e.g. borders in a [BoxDecoration] contribute to the [padding]); -/// see [Decoration.padding]. -/// /// See also: /// /// * [Ink], which paints a [Decoration] on a [Material], allowing