Expandable class

Inheritance

Constructors

Expandable({Key? key, required Widget firstChild, required Widget secondChild, Widget? subChild, Function? onPressed, Color backgroundColor = Colors.white, Duration animationDuration = const Duration(milliseconds: 400), DecorationImage? backgroundImage, bool? showArrowWidget, bool? initiallyExpanded, bool centralizeFirstChild = true, Widget? arrowWidget, ArrowLocation? arrowLocation = ArrowLocation.right, BorderRadius? borderRadius, Clickable clickable = Clickable.firstChildOnly, Function? onLongPress, Animation<double>? animation, AnimationController? animationController, void onHover(bool)?, List<BoxShadow>? boxShadow})
• Expandable widget for general use.
const

Properties

animation Animation<double>?
• Custom animation for size & rotation animations.
final
animationController AnimationController?
• Controller for animation.
final
animationDuration Duration
• Duration for expand & rotate animations.
final
arrowLocation ArrowLocation?
• Place of the arrow widget.
final
arrowWidget Widget?
• Custom widget that changes its direction with respect to expand animation.
final
backgroundColor Color
• Background color of the expandable.
final
backgroundImage DecorationImage?
• Background image of the expandable.
final
borderRadius BorderRadius?
BorderRadius of Expandable.
final
boxShadow List<BoxShadow>?
final
centralizeFirstChild bool
• Provides better alignment for firstChild.
final
clickable Clickable
• Decide click behaviour of the Expandable.
final
firstChild Widget
• The widget that is placed at the non-collapsing part of the expandable.
final
hashCode int
The hash code for this object.
no setterinherited
initiallyExpanded bool?
• Whether expandable will be expanded or collapsed at first.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onHover → (void Function(bool)?)
final
onLongPress Function?
final
onPressed Function?
• Animation starts BEFORE and ends AFTER this function.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondChild Widget
• The widget that size transition affects.
final
showArrowWidget bool?
• Whether arrowWidget will be shown or not.
final
subChild Widget?
final

Methods

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