VerticalDivider class
A thin vertical line, with padding on either side.
In the Material Design language, this represents a divider. Vertical dividers can be used in horizontally scrolling lists, such as a ListView with ListView.scrollDirection set to Axis.horizontal.
The box's total width is controlled by width. The appropriate padding is automatically computed from the width.
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.
link
To create a local project with this code sample, run:
flutter create --sample=material.VerticalDivider.1 mysample
This sample shows the creation of VerticalDivider widget, as described in:
https://m3.material.io/components/divider/overview
link
To create a local project with this code sample, run:
flutter create --sample=material.VerticalDivider.2 mysample
See also:
- ListView.separated, which can be used to generate vertical dividers.
- Divider, which is the horizontal analog of this widget.
- material.io/design/components/dividers.html
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- VerticalDivider
Constructors
Properties
- color → Color?
-
The color to use when painting the line.
final
- endIndent → double?
-
The amount of empty space under the divider.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indent → double?
-
The amount of empty space on top of the divider.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thickness → double?
-
The thickness of the line drawn within the divider.
final
- width → double?
-
The divider's width.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited