/// 
///
/// See also:
/// See also:
///
///
/// * [Typography]
/// * [Typography], the class that generates [TextTheme]s appropriate for a platform.
/// * [Theme]
/// * [Theme], for other aspects of a material design application that can be
/// See also [applyBoxFit], which applies the sizing semantics of these values
/// See also [applyBoxFit], which applies the sizing semantics of these values
/// (though not the alignment semantics).
/// (though not the alignment semantics).
///
/// The following diagrams show the effects of each value:
///
/// 
///
/// 
///
/// 
///
/// 
///
/// 
///
/// 
///
/// 
enumBoxFit{
enumBoxFit{
/// Fill the target box by distorting the source's aspect ratio.
/// Fill the target box by distorting the source's aspect ratio.
/// Creates a box that limits its size only when it's unconstrained.
/// Creates a box that limits its size only when it's unconstrained.
///
///
...
@@ -1199,7 +1335,7 @@ class LimitedBox extends SingleChildRenderObjectWidget {
...
@@ -1199,7 +1335,7 @@ class LimitedBox extends SingleChildRenderObjectWidget {
Keykey,
Keykey,
this.maxWidth:double.INFINITY,
this.maxWidth:double.INFINITY,
this.maxHeight:double.INFINITY,
this.maxHeight:double.INFINITY,
Widgetchild
Widgetchild,
}):assert(maxWidth!=null&&maxWidth>=0.0),
}):assert(maxWidth!=null&&maxWidth>=0.0),
assert(maxHeight!=null&&maxHeight>=0.0),
assert(maxHeight!=null&&maxHeight>=0.0),
super(key:key,child:child);
super(key:key,child:child);
...
@@ -2188,6 +2324,64 @@ class Flex extends MultiChildRenderObjectWidget {
...
@@ -2188,6 +2324,64 @@ class Flex extends MultiChildRenderObjectWidget {
/// )
/// )
/// ```
/// ```
///
///
/// ## Troubleshooting
///
/// ### Why is my row turning red?
///
/// If the contents of the row overflow, meaning that together they are wider
/// than the row, then the row runs out of space to give its [Expanded] and
/// [Flexible] children, and reports this by drawing a red warning box on the
/// edge that is overflowing.
///
/// #### Story time
///
/// Suppose, for instance, that you had this code:
///
/// ```dart
/// new Row(
/// children: <Widget>[
/// const FlutterLogo(),
/// const Text('Flutter\'s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.'),
/// const Icon(Icons.sentiment_very_satisfied),
/// ],
/// )
/// ```
///
/// The row first asks its first child, the [FlutterLogo], to lay out, at
/// whatever size the logo would like. The logo is friendly and happily decides
/// to be 24 pixels to a side. This leaves lots of room for the next child. The
/// row then asks that next child, the text, to lay out, at whatever size it
/// thinks is best.
///
/// At this point, the text, not knowing how wide is too wide, says "Ok, I will
/// be thiiiiiiiiiiiiiiiiiiiis wide.", and goes well beyond the space that the
/// row has available, not wrapping. The row responds, "That's not fair, now I
/// have no more room available for my other children!", and gets angry and
/// turns red.
///
/// The fix is to wrap the second child in an [Expanded] widget, which tells the
/// row that the child should be given the remaining room:
///
/// ```dart
/// new Row(
/// children: <Widget>[
/// const FlutterLogo(),
/// const Expanded(
/// child: const Text('Flutter\'s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.'),
/// ),
/// const Icon(Icons.sentiment_very_satisfied),
/// ],
/// )
/// ```
///
/// Now, the row first asks the logo to lay out, and then asks the _icon_ to lay
/// out. The [Icon], like the logo, is happy to take on a reasonable size (also
/// 24 pixels, not coincidentally, since both [FlutterLogo] and [Icon] honor the
/// ambient [IconTheme]). This leaves some room left over, and now the row tells
/// the text exactly how wide to be: the exact width of the remaining space. The
/// text, now happy to comply to a reasonable request, wraps the text within
/// that width, and you end up with a paragraph split over several lines.
///
/// ## Layout algorithm
/// ## Layout algorithm
///
///
/// _This section describes how a [Row] is rendered by the framework._
/// _This section describes how a [Row] is rendered by the framework._