fayeed / flutter_mentions

A simple flutter input widget to add @ mentions functionality to your app
MIT License
107 stars 122 forks source link

Provide a way to customize markup text #11

Closed NeoLSN closed 4 years ago

NeoLSN commented 4 years ago

We need a way to build our own markup text because we'll need to recognize those markups in the flutter_parsed_text widget.

fayeed commented 4 years ago

I could think of two ways to do this the first way is to provide a function something like this:

markupBuilder({String trigger, String mention, String: value}) String;

or maybe a simple string that needs to have some keywords which I can then replace with their respective values in FlutterMentions

Something like this, where [trigger] will get replaced by the current mention trigger & so on:

markupTemplate: '[trigger][mention][value]'

ps: I like the first approach more

NeoLSN commented 4 years ago

Personally, I prefer the first one, too. But I think if you can achieve both ways, you could set a priority orders for these.