Collapsible class

A widget that implicitly collapses and expands around its child by clipping it.

Inheritance

Constructors

Collapsible({Key? key, required Widget child, required bool collapsed, required CollapsibleAxis axis, AlignmentGeometry alignment = Alignment.center, double minWidthFactor = 0.0, double minHeightFactor = 0.0, bool fade = false, double minOpacity = 0.0, Duration duration = const Duration(milliseconds: 240), Curve curve = Curves.easeOut, Clip clipBehavior = Clip.hardEdge, VoidCallback? onComplete, bool maintainState = false, bool maintainAnimation = false})
A widget that implicitly collapses and expands around its child by clipping it.
const

Properties

alignment AlignmentGeometry
The alignment of the child within the ClipRect wrapping it.
final
axis CollapsibleAxis
The axes the widget will collapse/expand along.
final
child Widget
The components contained within the sub-menu.
final
clipBehavior Clip
The clipping behavior applied to the ClipRect that wraps the child.
final
collapsed bool
The state of the sub-menu, whether it's visible or not.
final
curve Curve
The easing curve applied to the collapsing/expanding animation.
final
duration Duration
The duration of the collapsing/expanding animation.
final
fade bool
If true, the child will fade in/out during the collapsing/expanding animation.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maintainAnimation bool
If false, the child and its sub-tree's animation tickers, if it has any, will be paused when in the collapsed state, if true, they will continue running.
final
maintainState bool
If false, the child will be replaced with a SizedBox.shrink() when the Collapsible is in its collapsed state, if true, the child will remain built when collapsed.
final
minHeightFactor double
The value the height of the child is multiplied by when the widget is in its collapsed state.
final
minOpacity double
If fade is true, the opacity will be transitioned to minOpacity when the widget is in its collapsed state.
final
minWidthFactor double
The value the width of the child is multiplied by when the widget is in its collapsed state.
final
onComplete VoidCallback?
A callback called every time the animation completes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CollapsibleState
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}) 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