buildPopup method

  1. @override
  2. @protected
Widget buildPopup()
override

Implementation

@override
@protected
Widget buildPopup() {
  var childList = <Widget>[];

  var topChildList = <Widget>[];
  if (widget.header != null) {
    topChildList.add(AntdBox(
      style: style.headerStyle,
      child: widget.header,
    ));
  }
  if (widget.title != null) {
    topChildList.add(AntdBox(
      style: style.titleStyle,
      child: widget.title!,
    ));
  }
  if (widget.builder != null) {
    topChildList.add(AntdBox(
      style: style.contentStyle,
      child: widget.builder?.call(close, getState()),
    ));
  }
  if (topChildList.isNotEmpty) {
    childList.add(AntdBox(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: topChildList,
      ),
    ));
  }

  if (widget.actions != null) {
    var buildActionList = buildActions();
    if (buildActionList.isNotEmpty) {
      childList.addAll(buildActionList);
    }
  }

  return Column(
    mainAxisSize: MainAxisSize.min,
    children: childList,
  );
}