modalBody property

Widget get modalBody

Returns the modal body widget

Implementation

Widget get modalBody {
  final modalHeaderFn = modalHeader;
  final modalDividerWidget = modalDivider;
  final modalFooterWidget = modalFooter;

  final widgets = <Widget>[];
  if (!modalConfig.isFullPage && modalHeaderFn != null) {
    widgets.add(modalHeaderFn);
  }
  if (modalDividerWidget != null) {
    widgets.add(modalDividerWidget);
  }
  widgets.add(
    Flexible(
      fit: modalConfig.isFullPage == true ? FlexFit.tight : FlexFit.loose,
      child: choiceList,
    ),
  );
  if (modalDividerWidget != null) {
    widgets.add(modalDividerWidget);
  }
  if (modalFooterWidget != null) {
    widgets.add(modalFooterWidget);
  }
  return Column(
    mainAxisSize: MainAxisSize.min,
    mainAxisAlignment: MainAxisAlignment.start,
    children: widgets,
  );
}