Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to create #HashTags #30

Closed
nosmirck opened this issue Apr 15, 2020 · 3 comments
Closed

Ability to create #HashTags #30

nosmirck opened this issue Apr 15, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@nosmirck
Copy link
Contributor

Just like @mentions it would be great to have #hashtags and have a onHashTagTap as we have for mentions.

@imtoori imtoori added the enhancement New feature or request label Apr 16, 2020
@imtoori
Copy link
Contributor

imtoori commented Apr 16, 2020

I think it's better to add some property to MessageInput to make it easy for you to implement this feature as a customization of the SDK
It will fulfil your requirements and it will make the widget more versatile

@imtoori
Copy link
Contributor

imtoori commented Apr 17, 2020

As pointed out by @nosmirck, we could pass a list of objects like this

class MessageParser{
  final RegExp exp;
  final Color color;
  final VoidCallback onTap;

  MessageParser({@required this.exp, @required this.color, this.onTap});
}

It's also a way to generalize the parsing of mentions.

The only problem I can see so far is that the message text is a MarkdownBody widget from the package flutter_markdown.
At the moment mentions are made clickable substituting the text with a markdown link (@imtoori = @imtoori) and handled using the property onTapLink of MarkdownBody.

I think this is a nice solution, but we need to review the markdown widget first.

@imtoori
Copy link
Contributor

imtoori commented Mar 25, 2021

This is doable using the textBuilder property of the MessageWidget, but I don't think we're gonna implement it in the SDK
Anyway, we're gonna add a guide on how to do this in our documentation
I'm closing this and I'll update you when the documentation is available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants