agreeCheckbox method

Widget agreeCheckbox(
  1. RxBool check,
  2. String title,
  3. String subtitle,
  4. BuildContext context, {
  5. void onTap()?,
})

Implementation

Widget agreeCheckbox(
    RxBool check, String title, String subtitle, BuildContext context,
    {void Function()? onTap}) {
  return Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    mainAxisSize: MainAxisSize.min,
    children: [
      Row(
        mainAxisSize: MainAxisSize.min,
        children: [
          InkWell(
            onTap: () {
              check.value = !check.value;
            },
            child: Container(
              height: context.isMobile ? 22 : 24,
              width: context.isMobile ? 22 : 24,
              decoration: BoxDecoration(
                border: Border.all(
                  color: check.value
                      ? ColorHelper.primaryColor1
                      : ColorHelper.neutralLight1,
                  width: 2,
                ),
                borderRadius: BorderRadius.circular(5),
              ),
              child: Icon(
                Icons.check,
                size: 12,
                color: check.value
                    ? ColorHelper.primaryColor1
                    : Colors.transparent,
              ),
            ),
          ),
          6.SpaceY,
          Text(
            title,
            style: TextStyle(
              fontSize: context.isMobile ? 12 : 14,
              fontWeight: FontWeight.w400,
              color: ColorHelper.neutralLightText,
            ),
          ),
          InkWell(
            onTap: onTap ??
                () {
                  goto(Routes.PRIVACY_POLICY, parameters: {
                    'fileName': 'WORD-TERMS-OF-SERVICE-.html',
                    'title': 'Privacy Policy',
                  });
                },
            child: Text(
              subtitle,
              style: TextStyle(
                fontSize: context.isMobile ? 12 : 14,
                fontWeight: FontWeight.w400,
                color: ColorHelper.primaryColor2,
              ),
            ),
          ),
        ],
      ),
    ],
  );
}