EditorScope class
The per-instance service and registry hub of one editor.
Every QuillKitController owns exactly one scope. It exposes the
document's attributes registry and rules, the list of registered
extensions, and a typed service locator (service/registerService)
holding injectable behaviors such as ClipboardService and
LinkLauncher. Nothing here is static: two editors on one screen have
two fully independent scopes.
The registry and rules are read through the owning controller's current document, so they stay correct when the controller's document is replaced.
Constructors
-
EditorScope({required Document document(), List<
EditorExtension> extensions = const <EditorExtension>[]}) -
Creates a scope reading registries from the document returned by
document(called on every access, so a replaced document is picked up automatically).
Properties
- attributes → AttributeRegistry
-
The attribute registry of the current document — the formats this
editor understands.
no setter
-
extensions
→ List<
EditorExtension> -
The extensions registered on the owning controller, in registration
order.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- rules → RuleSet
-
The edit rules of the current document.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerService<
T extends Object> (T implementation) → void -
Registers
implementationunder the typeT; the last write wins. -
service<
T extends Object> () → T? -
The registered service of type
T, ornullwhen none is registered. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited