TextDivider class
This class is a widget that provides the ability to display arbitrary text in the center of the divider.
It is possible to specify the direction of the Divider with the argument of the default constructor,
but a simpler way is to use the horizontal constructor. However, keep in mind that you cannot specify const
in the caller of the TextDivider
if you use this horizontal constructor.
Also you can use the vertical constructor for vertical direction. However, keep in mind that you cannot specify
const
in the caller of the TextDivider
if you use this vertical constructor.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TextDivider
Constructors
- TextDivider({Key? key, required Text text, Direction direction = Direction.horizontal, double? size, double? thickness, double? indent, double? endIndent, Color? color})
-
Returns the new instance of TextDivider based on arguments.
const
Properties
- color → Color?
-
The color to use when painting the line.
final
- direction → Direction
-
The divider's direction.
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
- size → double?
-
The divider's size.
final
- text → Text
-
The text that displays on the middle of divider.
final
- thickness → double?
-
The thickness of the line drawn within the divider.
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}) → 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
Static Methods
-
horizontal(
{Key? key, required Text text, double? size, double? thickness, double? indent, double? endIndent, Color? color}) → TextDivider - Returns the new instance of TextDivider in horizontal direction.
-
vertical(
{Key? key, required Text text, double? size, double? thickness, double? indent, double? endIndent, Color? color}) → TextDivider - Returns the new instance of TextDivider in vertical direction.