Unverified Commit d4c3c7ef authored by creativecreatorormaybenot's avatar creativecreatorormaybenot Committed by GitHub

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

parent 34ba6473
...@@ -68,7 +68,8 @@ class MyStatelessWidget extends StatelessWidget { ...@@ -68,7 +68,8 @@ class MyStatelessWidget extends StatelessWidget {
height: 20, height: 20,
thickness: 5, thickness: 5,
indent: 20, indent: 20,
endIndent: 20, endIndent: 0,
color: Colors.black,
), ),
// Subheader example from Material spec. // Subheader example from Material spec.
// https://material.io/components/dividers#types // https://material.io/components/dividers#types
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
//*************************************************************************** //***************************************************************************
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker) //* ▼▼▼▼▼▼▼▼ 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 // 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 // horizontally centered black line that is 1 logical pixels thick. The grey
// line is indented by 20 logical pixels. // line is indented by 20 logical pixels.
...@@ -64,11 +64,11 @@ class MyStatelessWidget extends StatelessWidget { ...@@ -64,11 +64,11 @@ class MyStatelessWidget extends StatelessWidget {
), ),
), ),
const VerticalDivider( const VerticalDivider(
color: Colors.grey, width: 20,
thickness: 1, thickness: 1,
indent: 20, indent: 20,
endIndent: 0, endIndent: 0,
width: 20, color: Colors.grey,
), ),
Expanded( Expanded(
child: Container( child: Container(
......
...@@ -649,6 +649,7 @@ class _BottomSheetSuspendedCurve extends ParametricCurve<double> { ...@@ -649,6 +649,7 @@ class _BottomSheetSuspendedCurve extends ParametricCurve<double> {
/// ///
/// ** See code in examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart ** /// ** See code in examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart **
/// {@end-tool} /// {@end-tool}
///
/// See also: /// See also:
/// ///
/// * [BottomSheet], which becomes the parent of the widget returned by the /// * [BottomSheet], which becomes the parent of the widget returned by the
......
...@@ -33,10 +33,12 @@ import 'theme.dart'; ...@@ -33,10 +33,12 @@ import 'theme.dart';
/// ///
/// ** See code in examples/api/lib/material/divider/divider.0.dart ** /// ** See code in examples/api/lib/material/divider/divider.0.dart **
/// {@end-tool} /// {@end-tool}
///
/// See also: /// See also:
/// ///
/// * [PopupMenuDivider], which is the equivalent but for popup menus. /// * [PopupMenuDivider], which is the equivalent but for popup menus.
/// * [ListTile.divideTiles], another approach to dividing widgets in a list. /// * [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> /// * <https://material.io/design/components/dividers.html>
class Divider extends StatelessWidget { class Divider extends StatelessWidget {
/// Creates a material design divider. /// Creates a material design divider.
...@@ -186,16 +188,18 @@ class Divider extends StatelessWidget { ...@@ -186,16 +188,18 @@ class Divider extends StatelessWidget {
/// padding is automatically computed from the width. /// padding is automatically computed from the width.
/// ///
/// {@tool dartpad --template=stateless_widget_scaffold} /// {@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 /// 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 /// horizontally centered black line that is 1 logical pixels thick. The grey
/// line is indented by 20 logical pixels. /// line is indented by 20 logical pixels.
/// ///
/// ** See code in examples/api/lib/material/divider/vertical_divider.0.dart ** /// ** See code in examples/api/lib/material/divider/vertical_divider.0.dart **
/// {@end-tool} /// {@end-tool}
///
/// See also: /// See also:
/// ///
/// * [ListView.separated], which can be used to generate vertical dividers. /// * [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> /// * <https://material.io/design/components/dividers.html>
class VerticalDivider extends StatelessWidget { class VerticalDivider extends StatelessWidget {
/// Creates a material design vertical divider. /// Creates a material design vertical divider.
......
...@@ -24,7 +24,7 @@ import 'framework.dart'; ...@@ -24,7 +24,7 @@ import 'framework.dart';
/// ** See code in examples/api/lib/widgets/color_filter/color_filtered.0.dart ** /// ** See code in examples/api/lib/widgets/color_filter/color_filtered.0.dart **
///{@end-tool} ///{@end-tool}
/// ///
/// See Also: /// See also:
/// ///
/// * [BlendMode], describes how to blend a source image with the destination image. /// * [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. /// * [ColorFilter], which describes a function that modify a color to a different color.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment