atLoading property

  1. @override
Widget? get atLoading
override

The widget to display when the WidgetEvent.loading event occurs.

Implementation

@override
get atLoading {
  return Builder(builder: (context) {
    final theme = DrivenSpinnerTheme.of(context);
    final effectiveSize = size ?? theme.size;
    final effectiveWidth = width ?? theme.width;
    final effectiveOffset = offset ?? theme.offset;
    final effectiveRounded = rounded ?? theme.rounded;
    final effectiveColor = color ?? theme.color;
    final effectiveBackgroundColor = backgroundColor ?? theme.backgroundColor;
    return SizedBox.square(
      dimension: effectiveSize,
      child: CircularProgressIndicator(
        strokeWidth: effectiveWidth,
        strokeAlign: effectiveOffset,
        strokeCap: effectiveRounded ? StrokeCap.round : StrokeCap.square,
        color: effectiveColor,
        backgroundColor: effectiveBackgroundColor,
      ),
    );
  });
}