TextPositionDiagnosticsSource class final

Produces positional diagnostics from a listenable text source.

Consumers can observe value directly or route it through TextDiagnosticsBinding.fromPositionListenable to apply the diagnostics to an editor controller.

Inheritance
Implemented types

Constructors

TextPositionDiagnosticsSource({required ValueListenable<String> text, required TextPositionDiagnosticsBuilder buildDiagnostics, bool syncImmediately = true})
TextPositionDiagnosticsSource.patternRules({required ValueListenable<String> text, required Iterable<TextPatternDiagnosticRule> rules, bool syncImmediately = true})
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text ↔ ValueListenable<String>
The text source currently driving this producer.
getter/setter pair
value → Iterable<TextPositionDiagnosticRange>
Current positional diagnostics.
no setteroverride

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear() → void
Clears the current diagnostics without changing the source text.
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
sync({bool force = false}) → void
Recomputes diagnostics from the current text source.
toString() → String
A string representation of this object.
inherited

Operators

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