Components & widgets with rich text, custom selection toolbar & syntax highlight support. Useful for Rich text editors.
The main components of this package
- CreamyTextField (REMOVED)
- Syntax Highlighter
The creamy_field package uses some code from flutter to keep API similar/compatible with other components in flutter.
This widget has been removed.
The CreamyTextField was a text widget similar to Flutter's
TextField widget with additional features. However, with update to flutter v2.x.x, we don't need this anymore. Components from this package can be used with flutter library to provide additional functionality while editing 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.
Some text features described above are provided by an extension on TextEditingController. Check
A horizontal widget with lists of indexes to represent adjacent TextField's line number.
LineCountIndicatorDecoration decoration can be applied to this widget.
Make sure that the decoration uses the same font-family & font-size from the TextField.
Makes a child widget horizontally scrollable. Developed with intent of wrapping a TextField to make it horizontally scrollable.
In the future, the controller in this widget which is provided to a child TextField will be used to determine horizontal scroll extent.
The class can be used to add additional toolbar actions to a selection toolbar in a text field.
This package provides several text selection controls (only 1 in v0.4.0) via CreamyTextSelectionControls. You can create your own selection controls which supports additional toolbar actions by mixing with
CreamyTextSelectionControls and providing that in
Versions before v0.4.0 is not compatible with flutter v2.x.x due to a lot of breaking changes introduced in Text editing APIs. We'll try to keep the API stable in v0.4.0 and above.
Use creamy_field v0.3.3 if you're using flutter sdk
Use creamy_field v0.3.2 if you're using flutter sdk
Use creamy_field v0.3.1 if you're using flutter sdk
Check screenshots folder for some sample UI screenshots.