SuraAccordion class

Custom accordion that similar to Flutter's ExpansionTile

Inheritance
Available Extensions

Constructors

SuraAccordion({Key? key, required Widget title, required List<Widget> children, required ValueChanged<bool> onToggle, required bool value, EdgeInsets margin = const EdgeInsets.all(0.0), EdgeInsets childrenPadding = const EdgeInsets.all(12.0), Widget icon = const Icon(Icons.keyboard_arrow_down), Curve curve = Curves.linear, Duration animationDuration = const Duration(milliseconds: 200), EdgeInsets? titlePadding, BoxDecoration? titleDecoration, bool showIcon = true, IconPosition iconPosition = IconPosition.end, Color? childrenBackgroundColor, bool animatedOnStart = false})
Custom accordion that similar to Flutter's ExpansionTile
const

Properties

animatedOnStart bool
Check if to run the toggle animation on initial
final
animationDuration Duration
Duration of the animation process
final
children List<Widget>
A widgets that show after the widget has expended
final
childrenBackgroundColor Color?
Background color of the wrapping children widgets
final
childrenPadding EdgeInsets
Padding of the children widgets
final
curve Curve
Animation curve when you click to expand or collapse the Accordion
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget
A trailing icon that rotate on expanded or collapse
final
iconPosition IconPosition
Position of the trailing icon
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsets
Margin of this widget
final
onToggle ValueChanged<bool>
A callback function that call on every toggle
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showIcon bool
Check if to show the trailing icon
final
title Widget
Accordion title, usually a Text
final
titleDecoration BoxDecoration?
Decoration of the title
final
titlePadding EdgeInsets?
Padding of the title, default value is EdgeInsets.all(16)
final
value bool
a condition if to expand to Accordion on initial
final

Methods

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