Closed nirajjoshi closed 4 years ago
try master branch and set hasSpecialCharacters: true
EasyRichText(
"Tap recognizer to print this sentence. ~|[]{}#%^*+=_\|<>\$£€•.,?!’",
patternList: [
EasyRichTextPattern(
targetString: '~|[]{}#%^*+=_|<>\$£€•.,?',
hasSpecialCharacters: true,
recognizer: TapGestureRecognizer()
..onTap = () {
print("Tap recognizer to print this sentence.");
},
style: TextStyle(
decoration: TextDecoration.underline,
),
),
],
),
easy_rich_text:
git:
url: https://github.com/2000calories/flutter_easy_rich_text.git
ref: master
try master branch and set
hasSpecialCharacters: true
EasyRichText( "Tap recognizer to print this sentence. ~|[]{}#%^*+=_\|<>\$£€•.,?!’", patternList: [ EasyRichTextPattern( targetString: '~|[]{}#%^*+=_|<>\$£€•.,?', hasSpecialCharacters: true, recognizer: TapGestureRecognizer() ..onTap = () { print("Tap recognizer to print this sentence."); }, style: TextStyle( decoration: TextDecoration.underline, ), ), ], ),
easy_rich_text: git: url: https://github.com/2000calories/flutter_easy_rich_text.git ref: master
Thanks @2000calories . It worked. Please update pub version with this fix at https://pub.dev/packages/easy_rich_text as well.
updated
updated
Thanks.
@2000calories :
When we us special characters in EasyRichText as Target String like *~|[]{}#%^+=_|<>$£€•.,?!’** it crashes & fires below mentioned exception. Please refer screenshot from your example app only.
════════ Exception caught by widgets library ═══════════════════════════════════ The following FormatException was thrown building EasyRichText(dirty, dependencies: [DefaultTextStyle]): Lone quantifier *brackets((?<!\w)~|[]{}#%^+=_|<>$£€•.,?!’(?!\w))**