I have a situtaion where i need to edit a richtext widget. Im trying to design a compiler in flutter and syntax should be highlighted for it to be userfriendly. The syntax highlighting is working but im not able to edit the richtext. I'm just able to copy paste a code and the syntax is changing styles. I want to be able to edit the Text in RichText
Present Code
RichText(
textScaleFactor: _baseFontScale,
text: TextSpan(
style: TextStyle(fontFamily: 'monospace', fontSize: 12, height: 1.13),
children: <TextSpan>[
getSyntax(widget.syntax, widget.syntaxTheme).format(widget.code)
],
),
),
Im currently using stack and placing another textfield in the same place to achieve this but its not going so good. Any help is appreciated.