defaultLoaderBuilder static method

Widget defaultLoaderBuilder(
  1. DefaultLoadingStyle style
)

Implementation

static Widget defaultLoaderBuilder(DefaultLoadingStyle style) {
  return Builder(
    builder: (context) {
      return SizedBox.expand(
        child: Stack(
          children: [
            Opacity(
              opacity: style.overlayOpacity,
              child: Container(
                color: style.overlayColor ?? GBTheme.backgroundContrast(context),
              ),
            ),
            Center(
              child: CircularProgressIndicator.adaptive(
                valueColor: style.loadingColor != null ? AlwaysStoppedAnimation<Color>(style.loadingColor!) : null,
                backgroundColor: style.loadingBackgroundColor,
              ),
            ),
          ],
        ),
      );
    },
  );
}