Fix (Vertical)Divider samples & docs (#89062)

This commit is contained in:
creativecreatorormaybenot 2021-09-08 22:32:04 +00:00 committed by GitHub
parent 34ba64738e
commit d4c3c7efcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 6 deletions

View file

@ -68,7 +68,8 @@ class MyStatelessWidget extends StatelessWidget {
height: 20,
thickness: 5,
indent: 20,
endIndent: 20,
endIndent: 0,
color: Colors.black,
),
// Subheader example from Material spec.
// https://material.io/components/dividers#types

View file

@ -12,7 +12,7 @@
//***************************************************************************
//* description (do not modify or remove section marker)
// This sample shows how to display a [VerticalDivider] between an purple and orange box
// This sample shows how to display a [VerticalDivider] between a purple and orange box
// inside a [Row]. The [VerticalDivider] is 20 logical pixels in width and contains a
// horizontally centered black line that is 1 logical pixels thick. The grey
// line is indented by 20 logical pixels.
@ -64,11 +64,11 @@ class MyStatelessWidget extends StatelessWidget {
),
),
const VerticalDivider(
color: Colors.grey,
width: 20,
thickness: 1,
indent: 20,
endIndent: 0,
width: 20,
color: Colors.grey,
),
Expanded(
child: Container(

View file

@ -649,6 +649,7 @@ class _BottomSheetSuspendedCurve extends ParametricCurve<double> {
///
/// ** See code in examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart **
/// {@end-tool}
///
/// See also:
///
/// * [BottomSheet], which becomes the parent of the widget returned by the

View file

@ -33,10 +33,12 @@ import 'theme.dart';
///
/// ** See code in examples/api/lib/material/divider/divider.0.dart **
/// {@end-tool}
///
/// See also:
///
/// * [PopupMenuDivider], which is the equivalent but for popup menus.
/// * [ListTile.divideTiles], another approach to dividing widgets in a list.
/// * [VerticalDivider], which is the vertical analog of this widget.
/// * <https://material.io/design/components/dividers.html>
class Divider extends StatelessWidget {
/// Creates a material design divider.
@ -186,16 +188,18 @@ class Divider extends StatelessWidget {
/// padding is automatically computed from the width.
///
/// {@tool dartpad --template=stateless_widget_scaffold}
/// This sample shows how to display a [VerticalDivider] between an purple and orange box
/// This sample shows how to display a [VerticalDivider] between a purple and orange box
/// inside a [Row]. The [VerticalDivider] is 20 logical pixels in width and contains a
/// horizontally centered black line that is 1 logical pixels thick. The grey
/// line is indented by 20 logical pixels.
///
/// ** See code in examples/api/lib/material/divider/vertical_divider.0.dart **
/// {@end-tool}
///
/// See also:
///
/// * [ListView.separated], which can be used to generate vertical dividers.
/// * [Divider], which is the horizontal analog of this widget.
/// * <https://material.io/design/components/dividers.html>
class VerticalDivider extends StatelessWidget {
/// Creates a material design vertical divider.

View file

@ -24,7 +24,7 @@ import 'framework.dart';
/// ** See code in examples/api/lib/widgets/color_filter/color_filtered.0.dart **
///{@end-tool}
///
/// See Also:
/// See also:
///
/// * [BlendMode], describes how to blend a source image with the destination image.
/// * [ColorFilter], which describes a function that modify a color to a different color.