notify_engine.dart 630 B

123456789101112131415161718192021222324252627
  1. import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
  2. class NotifyEngine {
  3. //展示成功 对勾
  4. static void showSuccess(String message) {
  5. SmartDialog.showNotify(msg: message, notifyType: NotifyType.success);
  6. }
  7. //展示失败 叉叉
  8. static void showFailure(String message) {
  9. SmartDialog.showNotify(msg: message, notifyType: NotifyType.failure);
  10. }
  11. //展示错误 感叹号
  12. static void showError(String message) {
  13. SmartDialog.showNotify(msg: message, notifyType: NotifyType.error);
  14. }
  15. // 隐藏
  16. static void dismiss() {
  17. SmartDialog.dismiss(status: SmartStatus.allNotify);
  18. }
  19. }