Expandable constructor Null safety

Expandable(
  1. {Widget? primaryWidget,
  2. Widget? secondaryWidget,
  3. Function? onPressed,
  4. Color? backgroundColor = Colors.white,
  5. double? elevation = 0,
  6. ShapeBorder? shape,
  7. EdgeInsets? padding = const EdgeInsets.all(20.0),
  8. Duration? animationDuration = const Duration(milliseconds: 100),
  9. Duration? beforeAnimationDuration,
  10. DecorationImage? backgroundImage,
  11. bool? showArrowIcon = false,
  12. bool? hoverOn,
  13. Widget? arrowWidget,
  14. bool? centralizePrimaryWidget = false,
  15. bool? isClickable = true,
  16. ArrowLocation? arrowLocation = ArrowLocation.right}
)

• Provides an expandable widget for general use.

• See ExpandableWidget for more details.

Implementation

Expandable({
  Widget? primaryWidget,
  Widget? secondaryWidget,
  Function? onPressed,
  Color? backgroundColor = Colors.white,
  double? elevation = 0,
  ShapeBorder? shape,
  EdgeInsets? padding = const EdgeInsets.all(20.0),
  Duration? animationDuration = const Duration(milliseconds: 100),
  Duration? beforeAnimationDuration,
  DecorationImage? backgroundImage,
  bool? showArrowIcon = false,
  bool? hoverOn,
  Widget? arrowWidget,
  bool? centralizePrimaryWidget = false,
  bool? isClickable = true,
  ArrowLocation? arrowLocation = ArrowLocation.right,
})  : assert(primaryWidget != null),
      assert((isClickable == false && arrowWidget != null) ||
          (isClickable == true)),
      assert(arrowLocation != ArrowLocation.bottom &&
          arrowLocation != ArrowLocation.top),
      super(
        primaryWidget: primaryWidget,
        secondaryWidget: secondaryWidget,
        onPressed: onPressed,
        backgroundColor: backgroundColor,
        elevation: elevation,
        shape: shape,
        animationDuration: animationDuration,
        beforeAnimationDuration: beforeAnimationDuration,
        padding: padding,
        backgroundImage: backgroundImage,
        hoverOn: hoverOn,
        showArrowIcon: showArrowIcon,
        arrowWidget: arrowWidget,
        centralizePrimaryWidget: centralizePrimaryWidget,
        isClickable: isClickable,
        arrowLocation: arrowLocation,
      );