popup static method

dynamic popup(
  1. dynamic context, {
  2. required Widget widget,
  3. EdgeInsetsGeometry? padding,
  4. MainAxisAlignment? main,
})

Implementation

static popup(context,
    {required Widget widget,
    EdgeInsetsGeometry? padding,
    MainAxisAlignment? main}) {
  return showDialog(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          elevation: 0,
          backgroundColor: Colors.white,
          content: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            mainAxisSize: MainAxisSize.min,
            children: [
              Container(
                padding: padding ??
                    const EdgeInsets.symmetric(vertical: 20, horizontal: 15),
                decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.circular(10)),
                // width: Sizes.width(context)*0.9,

                child: widget,
              )
            ],
          ),
        );
      });
}