rich_code_editor 0.1.32 copy "rich_code_editor: ^0.1.32" to clipboard
rich_code_editor: ^0.1.32 copied to clipboard

outdated

Now create your own rich code editor with syntax highlight support in Flutter.

rich_code_editor #

A simple package that supports creating code editors in Flutter.

Getting Started #

Create your own implementation of RichTextEditingValueParserBase for any programming language of your choice and pass it to the RichTextField.

Check out example project for getting started with this project.

Explanation of most of the classes/widgets created #

  1. RichTextField
    • similar to TextField widget
    • top level widget that wraps everything inside
  2. RichTextFieldState
    • extends State
  3. RenderRichEditable
    • extends RenderBox
    • renderer for an editable text field
    • It does not directly provide affordances for editing the text,
    • but it does handle text selection and manipulation of the text cursor.
  4. RichTextEditingValueParser
    • responsible for parsing text and style
  5. RichTextEditingValue
    • similar to TextEditingValue
    • uses TextSpan instead of String
  6. RichTextEditingController
    • extends ValueNotifier of type
    • similar to TextEditingController but for
  7. RichEditableText
    • similar to EditableText
  8. RichEditableTextState
    • extends State
    • implements TextInputClient
    • parent for _RichEditable
  9. _RichEditable
    • extends LeafRenderObjectWidget
    • The createRenderObject & updateRenderObject methods update output TextSpans by calling RichTextEditingValueParser.updateSpansWithStyle
  10. Extensions
    • utilities for working with TextSpan

Credits #

A big thanks to Razvan Lung for starting the Rich text editor project "https://github.com/long1eu/rich_editor". Most of the codes have been used from his repo and adjusted as needed.

34
likes
0
pub points
21%
popularity

Publisher

unverified uploader

Now create your own rich code editor with syntax highlight support in Flutter.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on rich_code_editor