import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';

class LoadingDialog {

  static void show({int displayTime = 0}) {
    SmartDialog.showLoading(displayTime: Duration(milliseconds: displayTime));
  }

  static void showText(String msg, {bool backDismiss = false}) {
    SmartDialog.showLoading(
      msg: msg,
      backType: backDismiss ? SmartBackType.normal : SmartBackType.block,
    );
  }

  static void hide() {
    SmartDialog.dismiss();
  }
}
