controller/social_text_editing_controller
library
Classes
-
SocialTextEditingController
-
An improved TextEditingController for using with any widget that accepts TextEditingController.
It uses SocialTextSpanBuilder for rendering the content.
_detectionStream
returns content of the current cursor position. Positions are calculated by the cyrrent location of the word
Configuration is made by calling setter functions.
example:
_textEditingController = SocialTextEditingController()
..setTextStyle(DetectedType.mention, TextStyle(color: Colors.purple,backgroundColor: Colors.purple.withAlpha(50)))
..setTextStyle(DetectedType.url, TextStyle(color: Colors.blue, decoration: TextDecoration.underline))
..setTextStyle(DetectedType.hashtag, TextStyle(color: Colors.blue, fontWeight: FontWeight.w600))
..setRegexp(DetectedType.mention, Regexp("your_custom_regex_pattern");