update static method

Widget update({
  1. String? version,
  2. String? description,
  3. String? appLink,
  4. bool? allowDismissal,
  5. VoidCallback? onTap,
})

Implementation

static Widget update({
  String? version,
  String? description,
  String? appLink,
  bool? allowDismissal,
  VoidCallback? onTap,
}) {
  return Material(
    color: Colors.transparent,
    child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Container(
          padding: EdgeInsets.zero,
          height: Get.height.h / 10.h,
          width: Get.width.w / 1.5.w,
          decoration: BoxDecoration(
            color: Get.theme.primaryColor,
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(10.r),
              topRight: Radius.circular(10.r),
            ),
          ),
          child: Center(
            child: Icon(
              Icons.info,
              color: Get.theme.colorScheme.background,
              size: 40.spMin,
            ),
          ),
        ),
        Container(
          height: Get.height.h / 3.h,
          width: Get.width.w / 1.5.w,
          decoration: BoxDecoration(
            color: Get.theme.popupMenuTheme.color,
            borderRadius: BorderRadius.only(
              bottomLeft: Radius.circular(10.r),
              bottomRight: Radius.circular(10.r),
            ),
          ),
          child: Column(
            children: [
              Expanded(
                flex: 3,
                child: Padding(
                  padding: EdgeInsets.all(10.spMin),
                  child: Column(
                    children: [
                      Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Texts.body1('About Update'),
                          Texts.body2(version!, isItalic: true),
                        ],
                      ),
                      SizedBox(
                        height: 10.h,
                      ),
                      Expanded(
                        child: SingleChildScrollView(
                          child: Align(
                            alignment: Alignment.centerLeft,
                            child: Html(data: description),
                          ),
                        ),
                      )
                    ],
                  ),
                ),
              ),
              Expanded(
                flex: 1,
                child: Container(
                  padding: EdgeInsets.all(10.spMin),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      allowDismissal!
                          ? Expanded(
                              child: Buttons.textButton(
                                handler: Get.back,
                                widget: Texts.button('Later'),
                              ),
                            )
                          : const SizedBox(),
                      SizedBox(
                        width: allowDismissal ? 20.w : 0.w,
                      ),
                      Expanded(
                        child: Buttons.defaultButton(
                          handler: onTap!,
                          widget: Texts.button('Update'),
                        ),
                      ),
                    ],
                  ),
                ),
              ),
            ],
          ),
        ),
      ],
    ),
  );
}