Expansion class

Inheritance

Constructors

Expansion({Key? key, bool value = true, ValueChanged<bool>? onChanged, Duration duration = defaultDuration, Curve curve = defaultCurve, ExpansionTransitionBuilder? transitionBuilder = ExpansionTransition.crossFade, ExpansionLayoutBuilder layoutBuilder = ExpansionLayout.defaults, Widget? header, Widget? divider, Widget? collapsed, required Widget child})
const

Properties

child Widget
final
collapsed Widget?
final
curve Curve
final
divider Widget?
final
duration Duration
final
hashCode int
The hash code for this object.
no setterinherited
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layoutBuilder ExpansionLayoutBuilder
A function that wraps all of the children that are transitioning out, and the child that's transitioning in, with a widget that lays all of them out. This is called every time this widget is built. The function must not return null.
final
onChanged ValueChanged<bool>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transitionBuilder ExpansionTransitionBuilder?
A function that wraps a new content with an animation that transitions the content in when the animation runs in the forward direction and out when the animation runs in the reverse direction. This is only called when a new content is set (not for each build), or when a new transitionBuilder is set. If a new transitionBuilder is set, then the transition is rebuilt for the current content and all previous children using the new transitionBuilder. The function must not return null.
final
value bool
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}) 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

defaultCurve → const Curve
defaultDuration → const Duration