getCustomDialog static method

void getCustomDialog({
  1. String? title,
  2. String? middleText,
  3. List<Widget>? children,
})

Implementation

static void getCustomDialog({
  String? title,
  String? middleText,
  List<Widget>? children,
}) {
  Get.dialog(
    Dialog(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(MahasDimensions.getInputRadius()),
      ),
      backgroundColor: MahasColors.whiteColor,
      child: Padding(
        padding: EdgeInsets.all(MahasDimensions.getAppBarPadding()),
        child: IntrinsicHeight(
          child: Center(
            child: Column(
              children: [
                if (title != null)
                  getCustomText(
                    title,
                    size: MahasDimensions.getHeightPercentSize(
                        MahasDimensions.fontSizeLarge),
                    weight: FontWeight.w500,
                  ),
                if (title != null && middleText != null) getSpaceHeight(3),
                if (middleText != null)
                  getCustomTextWithoutMaxLine(
                    middleText,
                    size: MahasDimensions.getHeightPercentSize(
                        MahasDimensions.fontSizeMedium),
                  ),
                if (children != null) ...children,
              ],
            ),
          ),
        ),
      ),
    ),
  );
}