tncText method

Widget tncText(
  1. BuildContext context
)

Implementation

Widget tncText(BuildContext context) {
  final theme = hubbleThemeData(context);
  final termsBaseStyle =
      theme.typography.s10.copyWith(color: theme.colors.base.primary.light);
  final factory = Provider.of<_Factory>(context);

  return HubbleText.rich(
    [
      TextSpan(
        text: 'By continuing I agree to the ',
        style: termsBaseStyle,
      ),
      TextSpan(
        text: 'terms & conditions',
        style: termsBaseStyle.copyWith(
          decoration: TextDecoration.underline,
        ),
        recognizer: TapGestureRecognizer()
          ..onTap = () {
            Haptics.light();
            factory.onTermsAndConditionClick();
          },
      ),
      TextSpan(
        text: ' and ',
        style: termsBaseStyle,
      ),
      TextSpan(
        text: 'privacy policy',
        style: termsBaseStyle.copyWith(
          decoration: TextDecoration.underline,
        ),
        recognizer: TapGestureRecognizer()
          ..onTap = () {
            Haptics.light();
            factory.onPrivacyPolicyClick();
          },
      )
    ],
    textAlign: TextAlign.center,
  );
}