zuraffa_code_editor 0.1.1 copy "zuraffa_code_editor: ^0.1.1" to clipboard
zuraffa_code_editor: ^0.1.1 copied to clipboard

A customizable Flutter code field supporting syntax highlighting, code folding with visible closing lines, autocompletion and themes.

Changelog #

0.1.1 #

Fixed #

  • Fold ranges now end at the start of the last line only when that line is a closing line (), ], } …). 0.1.0 applied this unconditionally, which hid only the newline before a non-closing last line and glued the neighbouring lines together: folding

    // first line
    // second line
    // third line
    

    produced // first line// third line. Content lines — the tail of a // comment block, a continued argument, an import group — are hidden whole again, exactly as upstream does, while folded closers stay on screen as before: parsers: [ ],, void method() { }, ScraperConfig();.

  • The gutter now uses the code style's line height. CodeField._buildGutter() copied fontSize and fontFamily from the code style "for consistency with lines" but not height, so gutter rows fell back to the font's own metrics — 19 px against the code's 21 px at the default style. The two grids therefore drifted ~1.9 px on every line, reaching ~60 px by line 36 of a typical file. Because the fold chevron is centred in its gutter row it inherited that drift, so chevrons climbed above the line they labelled (over half a line off by line 9, worse further down). The gutter now starts on the code text's top edge with a row pitch equal to the rendered line height.

Added #

  • gutter_alignment_test.dart pins the gutter/code grid invariant — top edge and row pitch — in both the folded and unfolded states.
  • Comment-block regression tests pinning that non-closing blocks hide their last line whole, with no glued text.

0.1.0 #

First release of zuraffa_code_editor, a maintained fork of flutter_code_editor 0.3.5.

Changed #

  • Folded blocks keep their closing line visible. Upstream hid a folded block through the end of its last line, so folding parsers: [ ... ] left a dangling parsers: [ with no matching ], — broken-looking code. The fold range now ends at the start of the block's last line, so the closing line stays on screen: parsers: [ ],, void method() { }, ScraperConfig();. Gutter line numbering, fold-toggle placement and the number of rendered rows are all unchanged — only the closing text is added back.
  • Repackaged from flutter_code_editor to zuraffa_code_editor; all imports are now package:zuraffa_code_editor/zuraffa_code_editor.dart.
  • Linting moved from total_lints to flutter_lints.

Thanks #

Everything except the fold change above is the work of the upstream akvelon/flutter-code-editor contributors. Changes to this fork's own code are dedicated to the public domain under CC0.

0.3.5 #

0.3.4 #

0.3.3 #

0.3.2 #

  • Flutter 3.22 WASM fixes

0.3.1 #

  • Support for Flutter v3.13.6.

0.3.0 #

  • BREAKING: Deleted CodeController.stringMap.
  • BREAKING: Deleted theme from CodeController, (Issue 172).

0.2.24 #

  • Hide the suggestion box when CodeField is disposed (Issue 241).
  • Fix issues with Flutter 3.10.

0.2.23 #

  • Added CodeController.readOnly.

0.2.22 #

  • Fixed most of the search bugs (Issue 228).

0.2.21 #

  • 'Enter' key in the search pattern input scrolls to the next match.

0.2.20 #

  • Alpha version of search.

0.2.19 #

  • Fixed inability to change the value with WidgetTester.enterText() (Issue 232).

0.2.18 #

  • Fixed the suggestion box horizontal offset (Issue 224).

0.2.17 #

  • Allow to disable autocompletion (Issue 206).
  • Close suggestions with Escape key (Issue 219).

0.2.16 #

  • Do not delete folded blocks by backspace or delete keys (Issue 210).
  • Use theme colors in error message overlays (Issue 212).

0.2.15 #

  • Suggestion box is shown in an OverlayEntry instead of Stack (Issue 207).

0.2.14 #

  • Fixed "Field 'windowSize' has not been initialized" bug (Issue 203).

0.2.13 #

  • Workaround to disable spellcheck in Firefox (Issue 197).

0.2.12 #

0.2.10 #

  • Added pluggable analyzers support (Issue 139).
  • Added DartPadAnalyzer.
  • Fixed linter issues (Issue 164).

0.2.9 #

  • Hiding line numbers, errors, and folding handles (Issue 159).
  • Indent new line after : in Python (Issue 135).
  • Track the test coverage, add the codecov badge (Issue 146).
  • Do not pale the editor if a visible section is set (Issue 153).
  • Added GIFs to README (Issue 148).
  • Fixed 'Index out of range' exception with visible sections on the default factorial example (Issue 152).
  • Fixed linter issues (Issue 147).

0.2.8 #

  • Java fallback parser preserves foldable blocks if highlight fails (Issue 48).

0.2.7 #

  • Fix joining nested foldable blocks (Issue 136).

0.2.6 #

  • Comment out and uncomment code with Ctrl-/ (Issue 117).

0.2.5 #

  • Tab and Shift-Tab handling (Issue 116).
  • Selection does not reset redo history (Issue 133).

0.2.4 #

  • Exported StringExtension.
  • Added an example with changing the language and the theme.

0.2.3 #

  • Fixed removing listeners in _CodeFieldState.dispose().

0.2.2 #

  • Added CodeController.lastTextSpan field (visible for testing) to return the last TextSpan produced by buildTextSpan().

0.2.1 #

  • Added the migration guide for 0.2 to README.

0.2.0 #

  • BREAKING: Removed theme from CodeController. Use CodeTheme widget instead.
  • BREAKING: Removed webSpaceFix, https://github.com/flutter/flutter/issues/77929
  • BREAKING: Fixed typo IntendModifier → IndentModifier.
  • BREAKING: CodeFieldState is now private.

0.1.15 #

  • Added a missing code file.

0.1.14 #

  • Python fallback parser preserves foldable blocks if highlight fails (Issue 49).

0.1.13 #

  • Remove an accidentally published temp file.

0.1.12 #

  • Reformatted the license, updated README.

0.1.11 #

  • Updated README.

0.1.10 #

  • Fixed formatting.

0.1.9 #

0.1.8 #

  • Fixed linter issues.

0.1.7 #

  • Fixed README errors.

0.1.6 #

  • Improved README.

0.1.5 #

  • Updated license formatting to match pub.flutter-io.cn requirements.

0.1.4 #

  • Added CodeController.readOnlySectionNames getter and setter (Issue 110).
  • Added CodeController.foldCommentAtLineZero, foldImports, foldOutsideSections (Issue 89).
  • Added CodeController.visibleSectionNames (Issue 27).
  • Fixed folding Python blocks with multiline if conditions (Issue 108).
  • Fixed folding duplicate blocks like [{...}] etc (Issue 99).
  • Fixed cutLineIndexIfVisible bug (Issue 112).

0.1.3 #

0.1.2 #

  • Preserve selection when folding and unfolding (Issue 81).

0.1.1 #

  • Added code folding.
  • Fixed editing around hidden text ranges.
  • Updated dependencies.

0.1.0 #

  • Highlights unterminated blocks for Java and Python.

0.0.9 #

  • Forked https://github.com/BertrandBev/code_field
  • Re-license under the Apache license, mention the original author as the original license required.
  • Added hidden service comment support.
  • Added read-only blocks support.
  • Added autocomplete for keywords, already-in-the-editor words, and external dictionary.
0
likes
150
points
82
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable Flutter code field supporting syntax highlighting, code folding with visible closing lines, autocompletion and themes.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #code-editor #syntax-highlighting #code-folding #zuraffa

License

Apache-2.0, MIT (license)

Dependencies

autotrie, characters, charcode, collection, equatable, flutter, flutter_highlight, highlight, http, linked_scroll_controller, meta, mocktail, scrollable_positioned_list, tuple, url_launcher

More

Packages that depend on zuraffa_code_editor