import 'package:flutter/material.dart';

AlertDialog _alert = AlertDialog(
  content: Row(
    children: [
      CircularProgressIndicator(),
      Container(margin: EdgeInsets.only(left: 7), child: Text("Loading...")),
    ],
  ),
);

class ProgressDialogUtil {
  static showProgressDialog(BuildContext context) {
    showDialog(
      barrierDismissible: false,
      context: context,
      builder: (BuildContext context) {
        return _alert;
      },
    );
  }

  static hideProgressDialog(BuildContext context) {
    Navigator.pop(context);
  }
}
