An extended text editing controller that supports different inline styles for custom regex.

Getting Started

1. Depend on it

Add this to your package's pubspec.yaml file:

  rich_text_controller: [latest version]

2. Install it

$ flutter pub get

3. Import it



See Example page for example code.


Property Description Default
Map<RegExp, TextStyle> patternMatchMap Map to match a certain RegExp pattern with a custom style --
Map<String, TextStyle> stringMatchMap Map to match a certain word with a custom style --
@required Function(List onMatch Void Callback for matched content --
@required Function(List onMatchIndex Void Callback for matched content on specific index --
bool deleteOnBack delete the last matched content on backspace or not false
bool regExpCaseSensitive control the caseSensitive parameter of the used RegExp true
bool regExpDotAll control the dotAll parameter of the used RegExp false
bool regExpMultiLine control the multiLine parameter of the used RegExp false
bool regExpUnicode control the unicode parameter of the used RegExp false


  • Must not add both patternMatchMap and stringMatchMap, only one of them.


Contributing is more than welcomed on any of my packages/plugins. I will try to keep adding suggested features as i go.

Current list of contributors:

  • EriKWDev
  • avatarnguyen
  • vs-krasnov
  • burhanaksendir
  • pal03377
  • joshuadeguzman
  • dafinoer


  • V1.0.0 - First Release.
  • V1.0.1 - Added Example.
  • V1.1.0 - Added onMatch Callback.
  • V1.2.0 - Resolved Issues + added String-Matching.
  • V1.3.0 - Resolved Issues + added Null safety.
  • V1.4.0 - Resolved Issues + added deleteOnBack functionality.
  • V1.4.2 - Resolved Issues.


Michael Aziz - Github


This project is licensed under the MIT License - see the file for details