QuillController class

Inheritance

Constructors

QuillController({required Document document, required TextSelection selection, QuillControllerConfig config = const QuillControllerConfig(), bool keepStyleOnNewLine = true, ReplaceTextCallback? onReplaceText, DeleteCallback? onDelete, void onSelectionCompleted()?, void onSelectionChanged(TextSelection textSelection)?, bool readOnly = false})
QuillController.basic({QuillControllerConfig config = const QuillControllerConfig()})
factory

Properties

changes → Stream<DocChange>
no setter
config → QuillControllerConfig
final
copiedImageUrl ↔ ImageUrl?
getter/setter pair
document ↔ Document
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
hasRedo → bool
no setter
hasUndo → bool
no setter
ignoreFocusOnTextChange ↔ bool
getter/setter pair
keepStyleOnNewLine → bool
Tells whether to keep or reset the toggledStyle when user adds a new line.
final
onDelete ↔ DeleteCallback?
Custom delete handler
getter/setter pair
onReplaceText ↔ ReplaceTextCallback?
Custom replaceText handler Return false to ignore the event
getter/setter pair
onSelectionChanged ↔ void Function(TextSelection textSelection)?
getter/setter pair
onSelectionCompleted ↔ void Function()?
getter/setter pair
pasteDelta → Delta
no setter
pastePlainText → String
no setter
pasteStyleAndEmbed → List<OffsetValue>
no setter
plainTextEditingValue → TextEditingValue
no setter
readOnly ↔ bool
Whether the text can be changed.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selection → TextSelection
Currently selected text within the document.
no setter
skipRequestKeyboard ↔ bool
Skip the keyboard request in QuillRawEditorState.requestKeyboard.
getter/setter pair
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.
getter/setter pair
toolbarButtonToggler ↔ Map<String, Attribute>
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
override
clear() → void
clear editor
clipboardPaste({void updateEditor()?}) → Future<bool>
Returns whether paste operation was handled here. updateEditor is called if paste operation was successful.
clipboardSelection(bool copy) → bool
compose(Delta delta, TextSelection textSelection, ChangeSource source) → void
dispose() → void
Discards any resources used by the object.
override
forceToggledStyle(Style style) → void
raw_editor_actions handling of backspace event may need to force the style displayed in the toolbar
formatSelection(Attribute? attribute, {bool shouldNotifyListeners = true}) → void
formatText(int index, int len, Attribute? attribute, {bool shouldNotifyListeners = true}) → void
formatTextStyle(int index, int len, Style style) → void
getAllIndividualSelectionStylesAndEmbed() → List<OffsetValue>
Returns all styles and Embed 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
highlightLines(int startIndex, int endIndex, String? color) → void
indentSelection(bool isIncrease) → void
moveCursorToEnd() → void
moveCursorToPosition(int position) → void
moveCursorToStart() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
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.
override
replaceText(int index, int len, Object? data, TextSelection? textSelection, {bool ignoreFocus = false, bool shouldNotifyListeners = true}) → void
replaceTextWithEmbeds(int index, int len, String insertedText, TextSelection? textSelection, {bool ignoreFocus = false, bool shouldNotifyListeners = true}) → void
toString() → String
A string representation of this object.
inherited
undo() → void
updateSelection(TextSelection textSelection, ChangeSource source) → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited