show static method

Future<void> show({
  1. required BuildContext context,
  2. Widget? child,
  3. bool darken = false,
})

Implementation

static Future<void> show({required BuildContext context, Widget? child, bool darken = false}) async {
  try {
    if (_currentHud != null) {
      _currentHud!.navigator!.pop();
    }
    CustomLoading hud = CustomLoading(child,darken);
    _currentHud = hud;
    Navigator.push(context, hud);
  } catch (e) {
    _currentHud = null;
  }
}