render method
Implementation
@override
Widget render(BuildContext context, AntdLoadingStyle style) {
if (spinning != true) {
return child ?? const AntdBox();
}
var box = AntdBox(disabled: true, child: child);
var style = getStyle(context);
var loadingType = circular == true
? _CircularLoadingIndicator(
size: style.size!, color: style.color!, duration: style.duration)
: _WaveBouncingBalls(
size: style.size!, color: style.color!, duration: style.duration);
var loading = Row(
mainAxisSize: MainAxisSize.min,
children: [
loadingType,
if (text != null)
AntdBox(
style: style.textStyle,
child: text,
)
],
);
return Stack(
alignment: Alignment.center,
children: [box, loading],
);
}