import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:making_school_asignment_app/common/config/request_config.dart';

class ImageDialog {
  static void showImgDialog(BuildContext context, String imgUrl) {
    showDialog(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          // insetPadding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 45.r),
          backgroundColor: Colors.transparent,
          contentPadding: EdgeInsets.zero,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
          content: Container(
              width: MediaQuery.of(context).size.width - 48.r,
              // height: MediaQuery.of(context).size.height * 0.4,
              color: Colors.white,
              // child: PhotoView(imageProvider: NetworkImage(imgUrl),backgroundDecoration: BoxDecoration(color: Colors.transparent),)),
              child: ListView(
                children: [
                  Image.network(
                    RequestConfig.imgUrl + imgUrl,
                    fit: BoxFit.fitWidth,
                  ),
                ],
              )),
        );
      },
    );
  }
}
