QuillController class Null safety



QuillController({required Document document, required TextSelection selection, bool keepStyleOnNewLine = false, ReplaceTextCallback? onReplaceText, DeleteCallback? onDelete, void onSelectionCompleted()?, void onSelectionChanged(TextSelection textSelection)?})


changes Stream<Tuple3<Delta, Delta, ChangeSource>>
copiedImageUrl Tuple2<String, String>?
read / write
document Document
Document managed by this controller.
hashCode int
The hash code for this object. [...]
read-only, inherited
hasListeners bool
Whether any listeners are currently registered. [...]
@protected, read-only, inherited
hasRedo bool
hasUndo bool
ignoreFocusOnTextChange bool
read / write
onDelete DeleteCallback?
Custom delete handler
read / write
onReplaceText ReplaceTextCallback?
Custom replaceText handler Return false to ignore the event
read / write
onSelectionChanged ↔ (void Function?(TextSelection textSelection)?)
read / write
onSelectionCompleted ↔ (void Function?()?)
read / write
plainTextEditingValue TextEditingValue
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selection TextSelection
Currently selected text within the document.
toggledStyle Style
Store any styles attribute that got toggled by the tap of a button and that has not been applied yet. It gets reset after each format action within the document.
read / write
toolbarButtonToggler Map<String, Attribute>
read / write


addListener(VoidCallback listener) → void
Register a closure to be called when the object changes. [...]
clear() → void
clear editor
compose(Delta delta, TextSelection textSelection, ChangeSource source) → void
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed). [...]
formatSelection(Attribute? attribute) → void
formatText(int index, int len, Attribute? attribute) → void
formatTextStyle(int index, int len, Style style) → void
getAllIndividualSelectionStyles() List<Tuple2<int, Style>>
Returns all styles for each node within selection
getAllSelectionStyles() List<Style>
Returns all styles for any character within the specified text range.
getPlainText() String
Returns plain text for each node within selection
getSelectionStyle() Style
Only attributes applied to all characters within this range are included in the result.
handleDelete(int cursorPosition, bool forward) → void
Called in two cases: forward == false && textBefore.isEmpty forward == true && textAfter.isEmpty Android only see https://github.com/singerdmx/flutter-quill/discussions/514
moveCursorToEnd() → void
moveCursorToPosition(int position) → void
moveCursorToStart() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
notifyListeners() → void
Call all the registered listeners. [...]
queryNode(int offset) Leaf?
Given offset, find its leaf node in document
redo() → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes. [...]
replaceText(int index, int len, Object? data, TextSelection? textSelection, {bool ignoreFocus = false}) → void
toString() String
A string representation of this object. [...]
undo() → void
updateSelection(TextSelection textSelection, ChangeSource source) → void


operator ==(Object other) bool
The equality operator. [...]