Skip to content

Commit 158bc18

Browse files
committed
Bump version to v0.2.24
1 parent 052101c commit 158bc18

File tree

3 files changed

+36
-31
lines changed

3 files changed

+36
-31
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.2.24
2+
3+
* Hide the suggestion box when `CodeField` is disposed (Issue [241](https://github.com/akvelon/flutter-code-editor/issues/241)).
4+
* Fix issues with Flutter 3.10.
5+
16
## 0.2.23
27

38
* Added `CodeController.readOnly`.

README.md

+29-29
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Flutter Code Editor is a multi-platform code editor supporting:
88

9-
- Syntax highlighting,
9+
- Syntax highlighting for over 100 languages,
1010
- Code blocks folding,
1111
- Autocompletion,
1212
- Read-only code blocks,
@@ -63,7 +63,7 @@ See the full runnable example [here](https://github.com/akvelon/flutter-code-edi
6363
### Syntax Highlighting
6464

6565
Flutter Code Editor supports
66-
[over a hundred languages](https://github.com/git-touch/highlight.dart/tree/master/highlight/lib/languages)
66+
[over a hundred languages](https://github.com/git-touch/highlight.dart/tree/master/highlight/lib/languages),
6767
relying on the [highlight](https://pub.dev/packages/highlight) package for parsing code.
6868

6969
To select a language, use a
@@ -109,14 +109,14 @@ The editor supports pluggable analyzers to highlight errors and show error messa
109109
We ship the following analyzers:
110110

111111
- `DefaultLocalAnalyzer` highlights unmatched pair characters for supported languages.
112-
It works on the client locally.
113-
It is selected by default on `CodeController` if no other analyzer is specified.
114-
- `DartPadAnalyzer` for Dart language, calls the [DartPad](https://dartpad.dev) backend for analysis.
112+
It works on the client locally,
113+
and is selected by default on `CodeController` if no other analyzer is specified.
114+
- `DartPadAnalyzer` for Dart language, calls upon the [DartPad](https://dartpad.dev) backend for analysis.
115115

116-
For other languages you can write custom analyzers that access your backend.
116+
For other languages, you can write custom analyzers that access your backend.
117117
See the code for `DartPadAnalyzer` for the implementation example.
118118

119-
To set the analyzer call any of the following:
119+
To set the analyzer, call any of the following:
120120

121121
```dart
122122
codeController = CodeController(language: dart, analyzer: DartPadAnalyzer());
@@ -125,15 +125,15 @@ codeController.setLanguage(dart, analyzer: DartPadAnalyzer());
125125
```
126126

127127
**Note:** Code analysis is an experimental feature.
128-
We may introduce breaking changes to `Analyzer` subclasses without following semver contract.
129-
If you only use the analyzers we ship then this will not affect you.
128+
We may introduce breaking changes to `Analyzer` subclasses without following the semver contract.
129+
If you only use the analyzers we ship, then this will not affect you.
130130

131131

132132
## Themes
133133

134134
### Pre-defined Themes
135135

136-
Flutter Code Editor supports themes from the [highlight](https://pub.dev/packages/flutter_highlight) package,
136+
Flutter Code Editor supports themes from the [highlight](https://pub.dev/packages/flutter_highlight) package
137137
see the full list of the pre-defined themes
138138
[here](https://github.com/git-touch/highlight.dart/tree/master/flutter_highlight/lib/themes).
139139

@@ -156,15 +156,15 @@ return MaterialApp(
156156

157157
### Custom Themes
158158

159-
To use a custom theme, create a map of styles under the pre-defined class names.
160-
See [an example](https://github.com/git-touch/highlight.dart/blob/master/flutter_highlight/lib/themes/monokai-sublime.dart).
159+
To use a custom theme, create a map of styles under the pre-defined class names
160+
see [this example](https://github.com/git-touch/highlight.dart/blob/master/flutter_highlight/lib/themes/monokai-sublime.dart).
161161

162162

163163
## Hiding Line Numbers, Errors, and Folding Handles
164164

165-
A lot of styling can be tuned with `GutterStyle` object passed to `CodeField` widget.
165+
A lot of styling can be tuned with a `GutterStyle` object passed to a `CodeField` widget.
166166
See
167-
[the example](https://github.com/akvelon/flutter-code-editor/tree/main/example/lib/03.change_language_theme)
167+
[this example](https://github.com/akvelon/flutter-code-editor/tree/main/example/lib/03.change_language_theme)
168168
that dynamically changes the properties listed here.
169169

170170
```dart
@@ -195,7 +195,7 @@ usable as one. However, code folding and other features have impact on built-in
195195
- `text` returns and sets the visible text. If any code is folded, it will not be returned.
196196
- `value` returns and sets the `TextEditingValue` with the visible text and selection.
197197
If any code is folded, it will not be returned.
198-
- `fullText` returns and sets the entire text including any folded blocks and hidden
198+
- `fullText` returns and sets the entire text, including any folded blocks and hidden
199199
service comments (see below).
200200

201201

@@ -244,7 +244,7 @@ To customize section parsing using any other syntax, subclass `AbstractNamedSect
244244

245245
## Read-Only Code Blocks
246246

247-
Flutter Code Editor allows to define read-only code blocks.
247+
Flutter Code Editor allows you to define read-only code blocks.
248248
This may be useful for learning use cases when users are guided to modify certain code blocks
249249
while other code is meant to be protected from changes.
250250

@@ -259,8 +259,8 @@ Any non-existent section names in this set are ignored.
259259
To make the code editable again, pass an updated set to `controller.readOnlySectionNames`.
260260

261261
When using this feature, `text` and `value` properties cannot be used to change the text
262-
programmatically because they have the same effect as the user input,
263-
and so locking affects them as well.
262+
programmatically because they have the same effect as the user input.
263+
This means that locking affects them as well.
264264

265265
To change a partially locked controller, set the `fullText` property.
266266

@@ -269,9 +269,9 @@ To change a partially locked controller, set the `fullText` property.
269269

270270
## Advanced Code Blocks Folding
271271

272-
### Folding The First Comment/License
272+
### Folding the First Comment/License
273273

274-
Many code snippets contain license as their first comment, and it can distract readers.
274+
Many code snippets contain a license as their first comment, which can distract readers.
275275
To fold the first comment, use:
276276

277277
```dart
@@ -292,9 +292,9 @@ controller.foldImports();
292292

293293
### Named Sections
294294

295-
The editor supports folding all blocks except specific named sections.
295+
The editor supports folding all blocks except for specific named sections.
296296
This helps the user focus on those sections while
297-
all source code is still there, can be expanded and copied by the user.
297+
all source code is still there and can be expanded and copied by the user.
298298

299299
To fold all blocks except those overlapping with the given named sections:
300300

@@ -323,8 +323,8 @@ To get the currently folded blocks, read `controller.code.foldedBlocks`.
323323

324324
## Hiding Text
325325

326-
The editor allows to completely hide all code except a specific named section.
327-
This is useful for even more focus than with folding.
326+
The editor allows you to completely hide all code except for a specific named section.
327+
This is useful to achieve even more focus than with folding.
328328

329329
To hide all the code except the given named section:
330330

@@ -337,7 +337,7 @@ controller.visibleSectionNames = {'section1'};
337337
When hiding text, the full text is still preserved
338338
and available via `fullText` property in the Flutter Code Editor.
339339

340-
Hiding text preserves line numbering which is not possible by just showing a cropped snippet.
340+
Hiding text preserves line numbering, which is not possible by just showing a cropped snippet.
341341
Preserving hidden text is also useful if you later need to send
342342
the full code for further processing but still want to hide
343343
non-informative parts.
@@ -359,18 +359,18 @@ The editor suggests words as they are typed. Suggested words are:
359359
- Words set with `controller.autocompleter.setCustomWords(['word1', 'word2'])`
360360

361361
All those words are merged into an unstructured dictionary.
362-
The editor performs no syntax analysis and so cannot tell if a given class really has
363-
the method the user is typing. This feature is meant to simplify typing but not to be relied on
362+
The editor does not perform any syntax analysis, so it cannot tell if a given class really has
363+
the method the user is typing. This feature is meant to simplify typing, but should not be relied on
364364
when exploring classes and methods.
365365

366+
![Suggestions example](https://raw.githubusercontent.com/akvelon/flutter-code-editor/main/example/images/suggestions_example.gif)
367+
366368
To disable autocompletion:
367369

368370
```dart
369371
controller.popupController.enabled = false;
370372
```
371373

372-
![Suggestions example](https://raw.githubusercontent.com/akvelon/flutter-code-editor/main/example/images/suggestions_example.gif)
373-
374374

375375
## Shortcuts
376376

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: flutter_code_editor
22
description: A customizable code field supporting syntax highlighting and code folding.
3-
version: 0.2.23
3+
version: 0.2.24
44
repository: https://github.com/akvelon/flutter-code-editor
55

66
environment:
7-
sdk: ">=2.17.0 <3.0.0"
7+
sdk: ">=2.17.0 <4.0.0"
88
flutter: ">=3.0.0"
99

1010
dependencies:

0 commit comments

Comments
 (0)