checkHastag function

dynamic checkHastag(
  1. String text,
  2. TextStyle? style
)

Implementation

checkHastag(String text, TextStyle? style,){
  if (text.contains("#")){
    return LinkableSpan(
      mouseCursor: SystemMouseCursors.click,
      inlineSpan: TextSpan(
        text: text,
        style: TextStyle(
          fontWeight: FontWeight.bold
        ),
        recognizer: (TapGestureRecognizer()..onTap = () {
          // print("erro ${text}");
          // Ui.of(context).errorAlert(message: "he");
        }),
      ),
    );
  }else{
    return TextSpan(
      text: text,
      style: style,
    );
  }
}