showMoreDialog function

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

Implementation

Future<dynamic> showMoreDialog(context, EnxController obj) {
  return showModalBottomSheet(

    backgroundColor: Colors.transparent,
      context: context,
      builder: (BuildContext context) {
        return Padding(
          padding:  const EdgeInsets.only(bottom: 120.0,left: 10,right: 10),
          child: Container(
            decoration: BoxDecoration(color:Colors.white,border: Border.all(
                width: 3.0
            ),
              borderRadius: const BorderRadius.all(
                  Radius.circular(15.0) //                 <--- border radius here
              ),
            ),
            child: ListView(
           shrinkWrap: true,
                children: [
              for (var item in obj.moreList)
                item.isSwitch
                    ? SwitchListTile(
                        title: Text(
                          item.name,
                          style: TextStyle(
                              color: Colors.black,
                              fontWeight: FontWeight.w800,
                              fontSize: 16.sp),
                        ),
                        value: item.status,
                        activeColor: CustomColors.themeColor,
                        inactiveTrackColor: Colors.grey,
                        onChanged: (bool value) {
                          item.status = value;
                          obj.updateMoreList(item);
                          Get.back();
                        },
                        secondary: Image.asset(
                          item.status ? item.activeIcon : item.icon,
                          width: 30,
                          height: 30,
                          package: 'enx_uikit_flutter',
                        ),
                      )
                    : GestureDetector(
                    behavior: HitTestBehavior.opaque,

                    onTap: () {

                          obj.updateMoreList(item);
                          Get.back();
                        },
                        child: Padding(
                          padding: EdgeInsets.only(left: 15.w, top: 10.w),
                          child: Row(
                            crossAxisAlignment: CrossAxisAlignment.center,
                            children: [
                              Image.asset(
                                     item.icon,
                                width: 40,
                                height: 40,
                                package: 'enx_uikit_flutter',
                              ),
                              Padding(
                                padding: EdgeInsets.fromLTRB(15.w, 0, 0, 0),
                                child: Text(
                                  item.name,
                                  style: TextStyle(
                                      color: Colors.black,
                                      fontWeight: FontWeight.w800,
                                      fontSize: 16.sp),
                                  textAlign: TextAlign.center,
                                ),
                              )
                            ],
                          ),
                        ))
            ]),
          ),
        );
      });
}