showTenLoading static method

void showTenLoading(
  1. BuildContext context
)

Implementation

static void showTenLoading(BuildContext context) {
  if (_loadingEntry != null) {
    return debugPrint("程序重复调用showTenLoading");
  }
  OverlayState? overlayState = Overlay.of(context);
  _loadingEntry = OverlayEntry(
    builder: (context) => Material(
      color: Colors.transparent,
      child: Container(
        color: TenScheme.maskColor,
        child: const Center(
          child: CircularProgressIndicator(color: Colors.white),
        ),
      ),
    ).animate().fadeIn(curve: Curves.decelerate),
  );

  if (_loadingEntry != null) overlayState.insert(_loadingEntry!);
}