MinimalSectionHeader class
The header over a group of full-bleed rows — MORNING 2/3: the label
upper-cased in the label register, with a mono count (or any trailing
widget) at the end, on the gutter with 14 px of air above and 6 below.
No rule of its own: the rows under it draw theirs.
With onExpansionChanged the header collapses its group: a chevron leads the label, the band from the chevron to the count is the control, and it announces expanded. A trailing widget stays outside that control, its own node beside it, so a small icon button or a menu there never nests a button in a button. Pass padding to set it inside an already padded body.
MinimalSectionHeader('Morning', count: '2/3')
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MinimalSectionHeader
Constructors
-
MinimalSectionHeader(String label, {Key? key, String? count, Widget? trailing, Widget? leading, bool expanded = true, ValueChanged<
bool> ? onExpansionChanged, EdgeInsetsGeometry padding = MinimalSectionHeader.inset}) -
A header labelling the group under it.
const
Properties
- count → String?
-
A mono figure at the end (
2/3,12,71 / 84).final - expanded → bool
-
Whether the group's rows are showing; read only with
onExpansionChanged.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
The group's name, printed upper-cased.
final
- leading → Widget?
-
A mark before the label (a status glyph for a status group).
final
-
onExpansionChanged
→ ValueChanged<
bool> ? -
Makes the header a disclosure control for its group: called with the
next state, the opposite of expanded.
final
- padding → EdgeInsetsGeometry
-
Space round the header.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trailing → Widget?
-
Any other end widget (a small icon button, a menu); with
onExpansionChanged it sits beside the disclosure control, not inside
it.
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.
override
-
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
Constants
- inset → const EdgeInsets
- The header's band inset: the gutter at the sides, 14 above, 6 below.