Rich Text Editing Field & other components with rich text, selection toolbar & syntax highlight support. Useful in Rich text editors.
Components & widgets with rich text, custom selection toolbar & syntax highlight support. Useful for Rich text editors.
Getting Started #
The main components of this package #
The creamy_field package uses code from flutter to keep API similar/compatible with other components in flutter.
The CreamyTextField is a text widget similar to Flutter's
TextField widget. However, unlike a regular
TextField, this widget supports a syntax highlighter, line indicator, selection toolbar actions, custom text selection toolbar support, ability to horizontally scroll and a controller which provides more description about a text.
You can use a limited support for syntax highlighting of many programming languages & themes using CreamySyntaxHighlighter.
Since, the text field itself is independent of the syntax highlighting rules, you will only need to implement the syntax highlighter implementation separately for your custom syntax and provide this to the controller.
The CreamyEditingController is responsible for changing tab sizes, applyng syntax highlighting to text and providing other useful information like line count.
You can use CreamyEditingController as TextEditingController in regular TextFields/TextFormFields of flutter. Syntax highlighting will work on them too.
The additional toolbar actions added in CreamyTextField is shown in creamyTextSelectionControls.
If you won't use creamyTextSelectionControls as your CreamyField's text selection control, then actions will not be shown.
Versions before v0.3.3 is not compatible with flutter v1.22.0 and above due to a lot of breaking changes introduced in Text editing APIs.
Use creamy_field v0.3.1 if you're using flutter sdk before 1.20.0
Use creamy_field v0.3.2 if you're using flutter sdk before 1.22.0
Check screenshots folder for some sample UI screenshots.