Expander constructor

Expander({
  1. required AnimationController controller,
  2. required List<Widget> triggerWidgets,
  3. VoidCallback? onHide,
  4. VoidCallback? onShow,
  5. Duration? arrowRotationDuration,
  6. bool showRotatingArrow = true,
  7. bool rotateArrow = true,
  8. Color rotatingArrowColor = Colors.green,
  9. 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,
  );
}