Expander constructor
Expander({
- required AnimationController controller,
- required List<
Widget> triggerWidgets, - VoidCallback? onHide,
- VoidCallback? onShow,
- Duration? arrowRotationDuration,
- bool showRotatingArrow = true,
- bool rotateArrow = true,
- Color rotatingArrowColor = Colors.green,
- double rotatingArrowSize = 20,
controller Controls which expander triggers which expandable. Must not be null and should be the same as its Expandable's controller
triggerWidgets Widgets that will trigger the expansion animation
onHide This callback will be callend every time the animation controller is reversed (the expanded widget hides)
onShow This callback will be callend every time the animation controller is forwarded (the expanded widget shows)
arrowRotationDuration How long will it take to the arrow to rotate
showRotatingArrow Defaults to true
rotateArrow Defaults to true
rotatingArrowColor You may change the color of the rotating arrow
rotatingArrowSize You may change the size of the rotating arrow
Implementation
/// [onHide] This callback will be callend every time the animation controller is reversed (the expanded widget hides)
///
/// [onShow] This callback will be callend every time the animation controller is forwarded (the expanded widget shows)
///
/// [arrowRotationDuration] How long will it take to the arrow to rotate
///
/// [showRotatingArrow] Defaults to true
///
/// [rotateArrow] Defaults to true
///
/// [rotatingArrowColor] You may change the color of the rotating arrow
///
/// [rotatingArrowSize] You may change the size of the rotating arrow
///
factory Expander({
required AnimationController controller,
required List<Widget> triggerWidgets,
VoidCallback? onHide,
VoidCallback? onShow,
Duration? arrowRotationDuration,
bool showRotatingArrow = true,
bool rotateArrow = true,
Color rotatingArrowColor = Colors.green,
double rotatingArrowSize = 20,
}) {
return Expander._(
onHide: onHide,
onShow: onShow,
triggerWidgets: triggerWidgets,
arrowRotationDuration: arrowRotationDuration,
controller: controller,
showRotatingArrow: showRotatingArrow,
rotateArrow: rotateArrow,
rotatingArrowColor: rotatingArrowColor,
rotatingArrowSize: rotatingArrowSize,
builder: null,
);
}