FossSeparator class Layout

See the separator documentation ↗ or try it live in the playground ↗.
A hairline rule that divides content along a row or a column. Static and
non-interactive: a 1 logical pixel line in the border role.
orientation picks the axis. The rule fills its long axis, so that axis
must be bounded by the parent. FossSeparatorOrientation.horizontal (the
default) fills the width, so it needs a bounded-width parent (a Column
with stretch, or an Expanded inside a Row); vertical fills the height
and needs a bounded-height parent (a Row, for example, supplies it). An
unbounded long axis surfaces a layout error rather than misrendering. The
color comes from context.fossTheme; retheme globally through
FossColors.border rather than per instance.
Decorative by default: decorative true keeps the line out of the semantics tree, the common case for a purely visual rule. Set it false to mark a real content boundary; the line then emits a structural boundary node that groups and separates the surrounding content. The node carries no spoken label by design, since a divider names nothing.
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text('Above'),
FossSeparator(),
Text('Below'),
],
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FossSeparator
Constructors
- FossSeparator({FossSeparatorOrientation orientation = FossSeparatorOrientation.horizontal, bool decorative = true, Key? key})
-
const
Properties
- decorative → bool
-
Whether the rule is purely visual. When true (the default) the line is
hidden from the semantics tree; set it false to expose a content boundary.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- orientation → FossSeparatorOrientation
-
The axis the rule runs along; FossSeparatorOrientation.horizontal by
default.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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