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(void listener()) → void
Register listener to be called when the object notifies.
inherited
clear() → void
Clears the current diagnostics without changing the source text.
dispose() → void
Releases all listeners. After this call the notifier should not be used.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notify all registered listeners.
inherited
removeListener(void listener()) → void
Remove a previously registered listener.
inherited
sync({bool force = false}) → void
Recomputes diagnostics from the current text source.
throwIfDisposed() → void
Throws StateError if this notifier has already been disposed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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