zuraffa_code_editor 0.1.1
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 lineproduced
// 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()copiedfontSizeandfontFamilyfrom the code style "for consistency with lines" but notheight, 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.dartpins 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 danglingparsers: [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_editortozuraffa_code_editor; all imports are nowpackage:zuraffa_code_editor/zuraffa_code_editor.dart. - Linting moved from
total_lintstoflutter_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 #
- Fixed line numbers not aligning with lines (https://github.com/akvelon/flutter-code-editor/pull/307)
0.3.4 #
- Added default height to
defaultTextStyle(https://github.com/akvelon/flutter-code-editor/pull/297). - Added
disposedandmountedchecks toCodeFieldandCodeController(https://github.com/akvelon/flutter-code-editor/pull/298). - Added
UndoHistoryControllertoCodeField(https://github.com/akvelon/flutter-code-editor/pull/302). - Added support for
yamlcomments (https://github.com/akvelon/flutter-code-editor/pull/305).
0.3.3 #
- Added
smartDashesTypeandsmartQuotesTypetoCodeField(https://github.com/akvelon/flutter-code-editor/pull/278). - Added named sections support for JavaScript and TypeScript (https://github.com/akvelon/flutter-code-editor/pull/291).
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
themefromCodeController, (Issue 172).
0.2.24 #
- Hide the suggestion box when
CodeFieldis disposed (Issue 241). - Fix issues with Flutter 3.10.
0.2.23 #
- Added
CodeController.readOnly.
0.2.21 #
- 'Enter' key in the search pattern input scrolls to the next match.
0.2.20 #
- Alpha version of search.
0.2.17 #
0.2.16 #
0.2.10 #
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.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.lastTextSpanfield (visible for testing) to return the lastTextSpanproduced bybuildTextSpan().
0.2.1 #
- Added the migration guide for 0.2 to README.
0.2.0 #
- BREAKING: Removed theme from
CodeController. UseCodeThemewidget instead. - BREAKING: Removed
webSpaceFix, https://github.com/flutter/flutter/issues/77929 - BREAKING: Fixed typo
IntendModifier→IndentModifier. - BREAKING:
CodeFieldStateis now private.
0.1.15 #
- Added a missing code file.
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.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.readOnlySectionNamesgetter and setter (Issue 110). - Added
CodeController.foldCommentAtLineZero,foldImports,foldOutsideSections(Issue 89). - Added
CodeController.visibleSectionNames(Issue 27). - Fixed folding Python blocks with multiline
ifconditions (Issue 108). - Fixed folding duplicate blocks like
[{...}]etc (Issue 99). - Fixed
cutLineIndexIfVisiblebug (Issue 112).
0.1.3 #
0.1.2 #
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.