buildBuilder method
Widget
buildBuilder(
)
override
Implementation
@override
@protected
Widget buildBuilder() {
var childList = <Widget>[];
var popup = buildPopup();
if (popup != null) {
childList.add(AntdBox(
style: style.bodyStyle,
child: popup,
));
}
if (widget.closeIcon != null) {
childList.add(getCloseIcon(AntdBox(
options: const AntdTapOptions(alwaysReceiveTap: true),
onTap: () async {
await close();
},
child:
AntdIconWrap(style: style.closeIconStyle, child: widget.closeIcon),
)));
}
return AntdBox(
onLayout: (layoutContext) {
var renderBox = layoutContext.renderBox;
if (layoutContext.hasSizeChange) {
popupWidth = renderBox.size.width;
popupHeight = renderBox.size.height;
openAnimation();
setState(() {});
}
},
child: Stack(
fit: StackFit.loose,
children: childList,
),
);
}