ConfigurableExpansionTile class
A configurable Expansion Tile edited from the flutter material implementation that allows for customization of most of the behaviour. Includes providing colours, replacement widgets on expansion, and animating preceding/following widgets.
See: ExpansionTile
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ConfigurableExpansionTile
Constructors
-
ConfigurableExpansionTile({Key? key, Color headerBackgroundColorStart = Colors.transparent, ValueChanged<
bool> ? onExpansionChanged, bool initiallyExpanded = false, required Widget header(bool isExpanded, Animation<double> iconTurns, Animation<double> heightFactor, ConfigurableExpansionTileController controller), Widget? animatedWidgetFollowingHeader, Widget? animatedWidgetPrecedingHeader, Color? expandedBackgroundColor, Color borderColorStart = Colors.transparent, Color borderColorEnd = Colors.transparent, bool topBorderOn = true, bool bottomBorderOn = true, Duration kExpand = const Duration(milliseconds: 200), Color? headerBackgroundColorEnd, Widget? headerExpanded, Animatable<double> ? headerAnimationTween, Animatable<double> ? borderAnimationTween, ConfigurableExpansionTileController? controller, Animatable<double> ? animatedWidgetTurnTween, Animatable<double> ? animatedWidgetTween, Widget? childrenBody, bool enableExpanded = true}) -
Creates a a Widget with an optional
animatedWidgetPrecedingHeader
and/oranimatedWidgetFollowingHeader
. Optionally, the header can change on the expanded state by proving a Widget inheaderExpanded
. Colors can also be specified for the animated transitions/states.childrenBody
are revealed when the expansion tile is expanded.const
Properties
- animatedWidgetFollowingHeader → Widget?
-
A widget to rotate following the header (ie an arrow)
final
- animatedWidgetPrecedingHeader → Widget?
-
A widget to rotate preceding the header (ie an arrow)
final
-
animatedWidgetTurnTween
→ Animatable<
double> ? -
Tween for turning animatedWidgetFollowingHeader and animatedWidgetPrecedingHeader
final
-
animatedWidgetTween
→ Animatable<
double> ? -
animatedWidgetFollowingHeader and animatedWidgetPrecedingHeader transition tween
final
-
borderAnimationTween
→ Animatable<
double> ? -
Border animation tween
final
- borderColorEnd → Color
-
The color of the border at the end of animation, after the list is expanded
final
- borderColorStart → Color
-
The color the border start, before the list is expanded
final
- bottomBorderOn → bool
-
Turns the bottom border of the list on/off
final
- childrenBody → Widget?
-
The widgets that are displayed when the tile expands.
final
- controller → ConfigurableExpansionTileController?
-
controller
final
- enableExpanded → bool
-
Whether to enable&disable the expansion function
final
- expandedBackgroundColor → Color?
-
The Color of the background of the childrenBody when expanded
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
header
→ Widget Function(bool isExpanded, Animation<
double> iconTurns, Animation<double> heightFactor, ConfigurableExpansionTileController controller) -
The header for the expansion tile
eg:
final
-
headerAnimationTween
→ Animatable<
double> ? -
Header transition tween
final
- headerBackgroundColorEnd → Color?
-
The Color the header will transition to on expand
final
- headerBackgroundColorStart → Color
-
The color of the header, useful to set if your animating widgets are
larger than the header widget, or you want an animating color, in which
case your header widget should be transparent
final
- headerExpanded → Widget?
-
An optional widget to replace header with if the list is expanded
final
- initiallyExpanded → bool
-
Specifies if the list tile is initially expanded (true) or collapsed (false, the default).
final
- kExpand → Duration
-
The duration of the animations
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onExpansionChanged
→ ValueChanged<
bool> ? -
Called when the tile expands or collapses.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- topBorderOn → bool
-
Turns the top border of the list is on/off
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ConfigurableExpansionTileState -
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