Embedding new diagrams for API Docs (#29697)
* Embedding new diarams for API docs: Container, ListView, Align. * Moving the diagrams to be enclosed within the snippet windows. * Fixed wording for the alt image text.
This commit is contained in:
parent
50f1e1822a
commit
76b9962fdd
@ -1576,6 +1576,8 @@ class Padding extends SingleChildRenderObjectWidget {
|
|||||||
/// [Alignment], [topRight]. This places the [FlutterLogo] in the top right corner
|
/// [Alignment], [topRight]. This places the [FlutterLogo] in the top right corner
|
||||||
/// of the parent blue [Container].
|
/// of the parent blue [Container].
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Center(
|
/// Center(
|
||||||
/// child: Container(
|
/// child: Container(
|
||||||
@ -1600,8 +1602,12 @@ class Padding extends SingleChildRenderObjectWidget {
|
|||||||
/// of [FlutterLogo]/2 + height of [FlutterLogo]/2) = (36.0, 48.0).
|
/// of [FlutterLogo]/2 + height of [FlutterLogo]/2) = (36.0, 48.0).
|
||||||
///
|
///
|
||||||
/// The [Alignment] class uses a coordinate system with an origin in the center
|
/// The [Alignment] class uses a coordinate system with an origin in the center
|
||||||
/// of the [Container], and so [Align] will place the [FlutterLogo] at (36.0, 48.0)
|
/// of the [Container], as shown with the [Icon] above. [Align] will place the
|
||||||
/// according to this system.
|
/// [FlutterLogo] at (36.0, 48.0) according to this coordinate system.
|
||||||
|
///
|
||||||
|
/// 
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Center(
|
/// Center(
|
||||||
@ -1637,6 +1643,10 @@ class Padding extends SingleChildRenderObjectWidget {
|
|||||||
/// corner of the [Container] in difference to the center-oriented system used in
|
/// corner of the [Container] in difference to the center-oriented system used in
|
||||||
/// the example above with [Alignment].
|
/// the example above with [Alignment].
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Center(
|
/// Center(
|
||||||
/// child: Container(
|
/// child: Container(
|
||||||
|
@ -183,12 +183,13 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
|
|||||||
/// see [Decoration.padding].
|
/// see [Decoration.padding].
|
||||||
///
|
///
|
||||||
/// {@tool sample}
|
/// {@tool sample}
|
||||||
///
|
|
||||||
/// This example shows a 48x48 amber square (placed inside a [Center] widget in
|
/// This example shows a 48x48 amber square (placed inside a [Center] widget in
|
||||||
/// case the parent widget has its own opinions regarding the size that the
|
/// case the parent widget has its own opinions regarding the size that the
|
||||||
/// [Container] should take), with a margin so that it stays away from
|
/// [Container] should take), with a margin so that it stays away from
|
||||||
/// neighboring widgets:
|
/// neighboring widgets:
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Center(
|
/// Center(
|
||||||
/// child: Container(
|
/// child: Container(
|
||||||
@ -200,6 +201,7 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
|
|||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
|
///
|
||||||
/// {@tool sample}
|
/// {@tool sample}
|
||||||
///
|
///
|
||||||
/// This example shows how to use many of the features of [Container] at once.
|
/// This example shows how to use many of the features of [Container] at once.
|
||||||
@ -210,6 +212,9 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
|
|||||||
/// centered in the box. Finally, the [transform] applies a slight rotation to the
|
/// centered in the box. Finally, the [transform] applies a slight rotation to the
|
||||||
/// entire contraption to complete the effect.
|
/// entire contraption to complete the effect.
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Container(
|
/// Container(
|
||||||
/// constraints: BoxConstraints.expand(
|
/// constraints: BoxConstraints.expand(
|
||||||
|
@ -608,6 +608,8 @@ abstract class BoxScrollView extends ScrollView {
|
|||||||
/// explicit [List<Widget>] of children. This [ListView]'s children are made up
|
/// explicit [List<Widget>] of children. This [ListView]'s children are made up
|
||||||
/// of [Container]s with [Text].
|
/// of [Container]s with [Text].
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// ListView(
|
/// ListView(
|
||||||
/// padding: const EdgeInsets.all(8.0),
|
/// padding: const EdgeInsets.all(8.0),
|
||||||
@ -631,11 +633,14 @@ abstract class BoxScrollView extends ScrollView {
|
|||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
|
///
|
||||||
/// {@tool sample}
|
/// {@tool sample}
|
||||||
/// This example mirrors the previous one, creating the same list using the
|
/// This example mirrors the previous one, creating the same list using the
|
||||||
/// [ListView.builder] constructor. Using the [IndexedWidgetBuilder], children
|
/// [ListView.builder] constructor. Using the [IndexedWidgetBuilder], children
|
||||||
/// are built lazily and can be infinite in number.
|
/// are built lazily and can be infinite in number.
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// final List<String> entries = <String>['A', 'B', 'C'];
|
/// final List<String> entries = <String>['A', 'B', 'C'];
|
||||||
/// final List<int> colorCodes = <int>[600, 500, 100];
|
/// final List<int> colorCodes = <int>[600, 500, 100];
|
||||||
@ -653,11 +658,15 @@ abstract class BoxScrollView extends ScrollView {
|
|||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
|
///
|
||||||
/// {@tool sample}
|
/// {@tool sample}
|
||||||
/// This example continues to build from our the previous ones, creating a
|
/// This example continues to build from our the previous ones, creating a
|
||||||
/// similar list using [ListView.separated]. Here, a [Divider] is used as a
|
/// similar list using [ListView.separated]. Here, a [Divider] is used as a
|
||||||
/// separator.
|
/// separator.
|
||||||
///
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// final List<String> entries = <String>['A', 'B', 'C'];
|
/// final List<String> entries = <String>['A', 'B', 'C'];
|
||||||
/// final List<int> colorCodes = <int>[600, 500, 100];
|
/// final List<int> colorCodes = <int>[600, 500, 100];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user