showLeaveMeetingDialog function

Future showLeaveMeetingDialog(
  1. dynamic context,
  2. EnxController obj
)

Implementation

Future showLeaveMeetingDialog(context, EnxController obj) {
  return showModalBottomSheet(backgroundColor: Colors.transparent,
      context: context,
      builder: (BuildContext context) {
        return Obx(() => Padding(
          padding:  const EdgeInsets.only(bottom: 120.0,left: 10,right: 10),
          child: Container(
            decoration:  BoxDecoration(color:Colors.white,border: Border.all(
              width: 1.0
          ),
            borderRadius: const BorderRadius.all(
                Radius.circular(15.0) //                 <--- border radius here
            ),
          ),
            child: ListView(
                shrinkWrap: true,
                children: [
                  Visibility(
                    visible: obj.isRole,
                    child: InkWell(
                      highlightColor: Colors.grey[200],
                      onTap: () {
                        obj.destroyRoom();
                        Get.back();
                      },
                      child: Center(
                        child: Padding(
                          padding:  EdgeInsets.all(20.w),
                          child: Text(
                            "End Meeting for All",
                            style: TextStyle(
                              fontSize: 18.sp,
                              color: Theme.of(context).primaryColor,
                              fontWeight: FontWeight.bold,
                            ),
                          ),
                        ),
                      ),
                    ),
                  ),
                  const Divider(
                    height: 1,
                    color: Colors.black54,
                  ),
                  InkWell(
                    highlightColor: Colors.grey[200],
                    onTap: () {
                      obj.disconnectRoom();
                      Get.back();
                    },
                    child: Center(
                      child: Padding(
                        padding:  EdgeInsets.all(20.h),
                        child: Text(
                          "Leave Meeting",
                          style: TextStyle(
                            fontSize: 18.sp,
                            color: Theme.of(context).primaryColor,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                      ),
                    ),
                  ),
                  const Divider(
                    height: 1,
                    color: Colors.black54,
                  ),
                  InkWell(

                    highlightColor: Colors.grey[200],
                    onTap: () {
                     Get.back();
                    },
                    child: Center(
                      child: Padding(
                        padding:  EdgeInsets.all(20.h),
                        child: Text(
                          "Cancel",
                          style: TextStyle(
                            fontSize: 18.sp,
                            fontWeight: FontWeight.bold,
                            color: Colors.black87
                          ),
                        ),
                      ),
                    ),
                  ),

                ]),
          ),
        ));
      });
}