render method
Implementation
Widget render([Widget? child]) {
var wrapChild = child ?? const SizedBox.shrink();
if (alignment != null) {
wrapChild = Align(
alignment: alignment!,
child: wrapChild,
);
}
wrapChild = buildSize(wrapChild)!;
if (padding != null) {
wrapChild = Padding(
padding: padding!,
child: wrapChild,
);
}
if (textStyle != null) {
wrapChild = DefaultTextStyle(
style: textStyle!,
child: wrapChild,
);
}
wrapChild = CustomPaint(
painter: AntdBoxPainter(
gradient: gradient,
borderRadius: radius,
border: border,
backgroundColor: color,
shadows: shadows),
child: wrapChild,
);
if (backdropFilter != null && backdropFilter! > 0) {
wrapChild = ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: backdropFilter!, sigmaY: backdropFilter!),
child: wrapChild,
),
);
}
if (margin != null) {
wrapChild = Padding(
padding: margin!,
child: wrapChild,
);
}
if (visibility != null) {
var result = visibility == AntdVisibility.visible;
wrapChild = Visibility(
visible: false,
maintainSize: result,
maintainAnimation: result,
maintainState: result,
child: wrapChild,
);
}
if (opacity != null) {
wrapChild = Opacity(
opacity: opacity!,
child: wrapChild,
);
}
if (colorFilter != null) {
wrapChild = ColorFiltered(
colorFilter: colorFilter!,
child: wrapChild,
);
}
return wrapChild;
}