Skip to content

Commit 890e584

Browse files
committed
Upgrade to 2.2.0: Support flutter 2.8
1 parent 881372d commit 890e584

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [2.2.0]
2+
* Support flutter 2.8.
3+
14
## [2.1.1]
25
* Add methods of clearing editor and moving cursor.
36

lib/src/widgets/raw_editor.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ class RawEditorState extends EditorState
725725
@override
726726
bool get wantKeepAlive => widget.focusNode.hasFocus;
727727

728+
@override
728729
bool get readOnly => widget.readOnly;
729730
}
730731

lib/src/widgets/raw_editor/raw_editor_state_keyboard_mixin.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,13 @@ mixin RawEditorStateKeyboardMixin on EditorState {
100100
TextSelection.collapsed(offset: selection.start),
101101
);
102102

103-
setTextEditingValue(TextEditingValue(
104-
text:
105-
selection.textBefore(plainText) + selection.textAfter(plainText),
106-
selection: TextSelection.collapsed(offset: selection.start),
107-
), SelectionChangedCause.keyboard);
103+
setTextEditingValue(
104+
TextEditingValue(
105+
text: selection.textBefore(plainText) +
106+
selection.textAfter(plainText),
107+
selection: TextSelection.collapsed(offset: selection.start),
108+
),
109+
SelectionChangedCause.keyboard);
108110
}
109111
return;
110112
}

lib/src/widgets/raw_editor/raw_editor_state_selection_delegate_mixin.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,12 @@ mixin RawEditorStateSelectionDelegateMixin on EditorState
131131
case TargetPlatform.fuchsia:
132132
case TargetPlatform.linux:
133133
case TargetPlatform.windows:
134-
// Collapse the selection and hide the toolbar and handles.
134+
// Collapse the selection and hide the toolbar and handles.
135135
userUpdateTextEditingValue(
136136
TextEditingValue(
137137
text: textEditingValue.text,
138-
selection: TextSelection.collapsed(offset: textEditingValue.selection.end),
138+
selection: TextSelection.collapsed(
139+
offset: textEditingValue.selection.end),
139140
),
140141
SelectionChangedCause.toolbar,
141142
);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_quill
22
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
3-
version: 2.1.1
3+
version: 2.2.0
44
#author: bulletjournal
55
homepage: https://bulletjournal.us/home/index.html
66
repository: https://github.com/singerdmx/flutter-quill

0 commit comments

Comments
 (0)