mAgreementsTextSpanList function

List<TextSpan> mAgreementsTextSpanList(
  1. LoginAgreeHandleInterface? interface, {
  2. bool? isWhiteAgreementText,
  3. Color? lightAgreementColor,
})

Implementation

List<TextSpan> mAgreementsTextSpanList(LoginAgreeHandleInterface? interface,
    {bool? isWhiteAgreementText, Color? lightAgreementColor}) {
  final TextStyle lightStyle = TextStyle(
    color: lightAgreementColor ?? MThemeConfig.mainColor.withOpacity(0.7),
    fontSize: 12,
    fontWeight: FontWeight.w600,
  );
  final TextStyle style = TextStyle(
    color: (isWhiteAgreementText ?? false)
        ? Colors.white
        : const Color(0xff111111),
    fontSize: 12.px,
    fontWeight: FontWeight.w600,
  );
  return [
    TextSpan(
      text: 'By using our App you agree with \nour ',
      style: style,
    ),
    TextSpan(
      text: 'Terms Conditions',
      style: lightStyle,
      recognizer: TapGestureRecognizer()
        ..onTap = () {
          // Handle Terms Conditions tap
          if (interface != null) {
            interface.toTerms();
          }
        },
    ),
    TextSpan(text: ' and ', style: style),
    TextSpan(
      text: 'Privacy Statement',
      style: lightStyle,
      recognizer: TapGestureRecognizer()
        ..onTap = () {
          print("interface != null::${interface != null}");
          // Handle Privacy Statement tap
          if (interface != null) {
            interface.toPrivacy();
          }
        },
    ),
  ];
}