Upgrade to 2.1.1

pull/515/head
X Code 3 years ago
parent 9f68930695
commit 1b44569436
  1. 5
      CHANGELOG.md
  2. 8
      lib/src/widgets/controller.dart
  3. 2
      pubspec.yaml

@ -1,5 +1,8 @@
## [2.1.1]
* Add methods of clearing editor and moving cursor.
## [2.1.0] ## [2.1.0]
* Add delete handler * Add delete handler.
## [2.0.23] ## [2.0.23]
* Support custom replaceText handler. * Support custom replaceText handler.

@ -124,9 +124,8 @@ class QuillController extends ChangeNotifier {
/// clear editor /// clear editor
void clear() { void clear() {
replaceText( replaceText(0, plainTextEditingValue.text.length - 1, '',
0, plainTextEditingValue.text.length-1, '', const TextSelection.collapsed(offset: 0));
TextSelection.collapsed(offset: 0));
} }
void replaceText( void replaceText(
@ -226,7 +225,8 @@ class QuillController extends ChangeNotifier {
} }
void moveCursorToStart() { void moveCursorToStart() {
updateSelection(TextSelection.collapsed(offset: 0), ChangeSource.LOCAL); updateSelection(
const TextSelection.collapsed(offset: 0), ChangeSource.LOCAL);
} }
void moveCursorToEnd() { void moveCursorToEnd() {

@ -1,6 +1,6 @@
name: flutter_quill name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 2.1.0 version: 2.1.1
#author: bulletjournal #author: bulletjournal
homepage: https://bulletjournal.us/home/index.html homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save