show method

void show(
  1. BuildContext context, {
  2. String? text,
  3. Widget? indicator,
})

Implementation

void show(BuildContext context, {String? text, Widget? indicator}) {
  GlobalKey<CsLoadingContainerState> key = GlobalKey<CsLoadingContainerState>();
  bool _animation = this.overlayEntry == null;
  _remove();

  OverlayEntry overlayEntry = OverlayEntry(
    builder: (BuildContext context) => CsLoadingContainer(
      key: key,
      text: text,
      indicator: indicator,
      animation: _animation,
    ),
  );

  Overlay.of(context).insert(overlayEntry);
  _overlayEntry = overlayEntry;
  _key = key;
}