FleatherController class

Inheritance
Available extensions

Constructors

FleatherController({ParchmentDocument? document, AutoFormats? autoFormats})

Properties

canRedo bool

Available on FleatherController, provided by the HistoryHandler extension

Returns true if there is at least one redo operation.
no setter
canUndo bool

Available on FleatherController, provided by the HistoryHandler extension

Returns true if there is at least one undo operation.
no setter
document ParchmentDocument
Document managed by this controller.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
plainTextEditingValue TextEditingValue
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection TextSelection
Currently selected text within the document.
no setter
toggledStyles ParchmentStyle
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.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear({bool closeDocument = true}) → void
Clear the controller state.
compose(Delta change, {TextSelection? selection, ChangeSource source = ChangeSource.remote, bool forceUpdateSelection = false}) → void
Composes change into document managed by this controller.
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).
override
formatSelection(ParchmentAttribute attribute) → void
Formats current selection with attribute.
formatText(int index, int length, ParchmentAttribute attribute, {bool notify = true}) → void
Update format of length characters in the document starting at index with the provided attribute.
getSelectionStyle() ParchmentStyle
Returns style of specified text range.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
redo() → void

Available on FleatherController, provided by the HistoryHandler extension

Sets current document state to it's next state, if any.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replaceText(int index, int length, Object data, {TextSelection? selection}) → void
Replaces length characters in the document starting at index with provided data.
toString() String
A string representation of this object.
inherited
undo() → void

Available on FleatherController, provided by the HistoryHandler extension

Sets current document state to it's previous state, if any.
updateSelection(TextSelection value, {ChangeSource source = ChangeSource.remote}) → void
Updates selection with specified value.

Operators

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