agreeCheckbox method

Widget agreeCheckbox(
  1. RxBool check,
  2. String title,
  3. String subtitle,
  4. BuildContext context,
)

Implementation

Widget agreeCheckbox(RxBool check, String title, String subtitle, BuildContext context) {
  return Row(
    mainAxisSize: MainAxisSize.min,
    children: [
      InkWell(
        onTap: () {
          check.value = !check.value;
        },
        child: Container(
          height: 24,
          width: 24,
          decoration: BoxDecoration(
            border: Border.all(
              color: check.value
                  ? ColorHelper.primaryColor1
                  : ColorHelper.neutralLight1,
              width: 2,
            ),
            borderRadius: BorderRadius.circular(5.dp),
          ),
          child: Icon(
            Icons.check,
            size: 14.dp,
            color: check.value
                ? ColorHelper.primaryColor1
                : Colors.transparent,
          ),
        ),
      ),
      10.SpaceY,
      InkWell(
        onTap: () {
          goto(Routes.PRIVACY_POLICY, parameters: {
            'fileName': 'WORD-TERMS-OF-SERVICE-.html',
            'title': 'Privacy Policy',
          });
        },
        child: RichText(
          textAlign: TextAlign.center,
          text: TextSpan(
            text: title,
            style: TextStyle(
              fontSize: context.isMobile ? 14 : 16,
              fontWeight: FontWeight.w400,
              color: ColorHelper.neutralLightText,
              // height: 1.2,
            ),
            children: [
              TextSpan(
                  text: subtitle,
                  style: const TextStyle(color: ColorHelper.primaryColor2)),
            ],
          ),
        ),
      ),
    ],
  );
}