show method

void show()

Displays the indicator.

If an indicator is already active, it will be hidden before showing the new one. It also unFocuses any active input fields.

Implementation

void show() {
  FocusScope.of(_context).unfocus();
  hide();
  double indicatorSize = _context.screenSize.shortestSide * .25;
  _indicatorController = _smKey.currentState?.showSnackBar(
    GlueSnackBarWidget(
      key: ValueKey('indicator-service'),
      hideCallback: hide,
      dismissOnBack: true,
      dismissOnTapOutside: false,
      content: Center(
        child:
            _indicatorWidget ??
            AnimatedIndicatorWidget(size: indicatorSize, image: _logoImage),
      ),
      behavior: SnackBarBehavior.fixed,
      backgroundColor: Colors.black,
      elevation: 2.5,
      margin: EdgeInsets.zero,
    ),
  );
}