import 'package:flutter/material.dart';
import 'commonFun.dart';

//等待对话框
class CustomDialogWait extends Dialog {
  String title;
  bool ret = false;

  CustomDialogWait({this.title = ""});

  @override
  Widget build(BuildContext context) {
    Size mediaSize = MediaQuery.of(context).size;
    return WillPopScope(
      child: Material(
        type: MaterialType.transparency,
        child: Container(
          child: getMoreWidget(text: title),
        ),
      ),
      onWillPop: () {
        // 屏蔽点击返回键的操作
        Navigator.pop(context, ret);
      },
    );
  }
}
