GlassDisclosure class
A section that opens and closes: a header row with a title and a chevron that turns to point down as the child grows into view below.
Give expanded to control it, and change it from onExpansionChanged; leave it null and the section keeps its own state, starting from initiallyExpanded.
On its own it sits on a card of glass. Set inset to false to put it in a GlassListSection as one of its rows.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GlassDisclosure
Constructors
-
GlassDisclosure.new({Key? key, required Widget title, required Widget child, Widget? leading, Widget? subtitle, bool? expanded, bool initiallyExpanded = false, ValueChanged<
bool> ? onExpansionChanged, bool inset = true, double borderRadius = 26, EdgeInsetsGeometry? childPadding, bool enabled = true, bool maintainState = false, FocusNode? focusNode}) -
Creates a disclosure section.
const
Properties
- borderRadius → double
-
The corner radius of its card; unused when inset is false.
final
- child → Widget
-
Shown when expanded.
final
- childPadding → EdgeInsetsGeometry?
-
The space round child. Defaults to a list row's insets; pass
EdgeInsets.zero for a child of rows.
final
- enabled → bool
-
Whether the header responds to input.
final
- expanded → bool?
-
Whether it's open, for a section the parent controls.
final
- focusNode → FocusNode?
-
The control's focus node, to drive or watch its focus.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initiallyExpanded → bool
-
Whether it starts open, for a section that keeps its own state.
final
- inset → bool
-
Whether it sits on a card of glass of its own.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
Sized 28px across, as a GlassListTile's.
final
- maintainState → bool
-
Whether to keep child built while it's closed.
final
-
onExpansionChanged
→ ValueChanged<
bool> ? -
Called with the new state when the header is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtitle → Widget?
-
Shown under the title, in smaller type.
final
- title → Widget
-
The header row's main line.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< GlassDisclosure> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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