renderText property
Map<String, String> Function({required String pattern, required String str})?
renderText
getter/setter pair
A callback function that takes two parameter String & pattern
@param str - is the word that is being matched @param pattern - pattern passed to the MatchText class
eg: Your str is 'Mention @michel:5455345
' where 5455345 is ID of this user
and @michel the value to display on interface.
Your pattern for ID & username extraction : /\[(@[^:]+):([^\]]+)\]/
i
Displayed text will be : Mention @michel
Implementation
Map<String, String> Function({
required String str,
required String pattern,
})? renderText;