OudsDivider class
OUDS Divider design guidelines
Reference design version : 1.0.0
Divider is a UI element that allows to structure the content by visually separating the content zones. Divider improves readability and content organization without introducing a stronger visual hierarchy like a heading or a container would.
You can choose the orientation by using one of the named constructors:
The following parameters are available:
- color The color of the divider, chosen from the OudsDividerColor enum. Default value set to OudsDividerColor.defaultColor.
- length The length of the divider (width for horizontal, height for vertical). Defaults to double.infinity for horizontal and 0 for vertical.
- thickness The thickness of the divider (height for horizontal, width for vertical).
- margin Optional margin around the divider, for spacing from surrounding content.
You can use OudsDivider component in your project, customizing parameters as needed :
Divider horizontal with default color :
Separates stacked vertical sections. Example use case: Between main content and a footer.
OudsDivider.horizontal(
color: OudsDividerColor.defaultColor
)
Divider vertical with default color :
Separates horizontally aligned elements. Example use case: Between two columns in a layout.
OudsDivider.vertical(
color: OudsDividerColor.defaultColor
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OudsDivider
Constructors
- OudsDivider.horizontal({Key? key, OudsDividerColor color = OudsDividerColor.defaultColor, double length = double.infinity, double? thickness, EdgeInsetsGeometry? margin})
-
Creates an horizontal divider.
const
- OudsDivider.vertical({Key? key, OudsDividerColor color = OudsDividerColor.defaultColor, double length = 0, double? thickness, EdgeInsetsGeometry? margin})
-
Creates a vertical divider.
const
Properties
- color → OudsDividerColor
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- length → double
-
final
- margin → EdgeInsetsGeometry?
-
final
- orientation → Axis
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thickness → double?
-
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