render method
Implementation
@override
@protected
Widget render(BuildContext context) {
var childList = <Widget>[];
Widget getMask() {
if (animation == null || animation?.holeAnimated == null) {
return CustomPaint(
painter: AntdMaskPainter(color: maskColor, hole: targetHole),
size: Size.infinite,
);
}
return buildAnimated(
controller, const AntdBox(), animation?.holeAnimated);
}
if (widget.showMask == true) {
childList.add(Positioned.fill(
child: buildAnimated(
controller,
GestureDetector(
onTap: () async {
widget.onMaskTap?.call();
if (widget.dismissOnMaskTap == true) {
await close();
}
},
child: getMask(),
),
animation?.maskAnimated)));
}
var content = buildBuilder();
if (content != null) {
childList
.add(buildAnimated(controller, content, animation?.contentAnimated));
}
return Stack(
children: childList,
);
}