TextDiagnosticsBinding class final

Keeps a TextAreaController's diagnostics in sync with its current text.

This is useful for lightweight producer-side integrations, such as pattern rules or other text-derived diagnostics, without duplicating controller listener and cache plumbing in each caller.

Constructors

TextDiagnosticsBinding({required TextAreaController controller, required TextDiagnosticsBuilder buildDiagnostics, bool syncImmediately = true})
TextDiagnosticsBinding.fromPositionListenable({required TextAreaController controller, required ValueListenable<Iterable<TextPositionDiagnosticRange>> diagnostics, bool syncImmediately = true})
factory
TextDiagnosticsBinding.fromRangeListenable({required TextAreaController controller, required ValueListenable<Iterable<TextDiagnosticRange>> diagnostics, bool syncImmediately = true})
factory
TextDiagnosticsBinding.patternRules({required TextAreaController controller, required Iterable<TextPatternDiagnosticRule> rules, bool syncImmediately = true})
factory

Properties

controller TextAreaController
The controller currently synced by this binding.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clears diagnostics managed by this binding.
dispose() → void
Detaches the binding from its controller.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sync({bool force = false}) → void
Recomputes diagnostics from the controller's current text.
toString() String
A string representation of this object.
inherited

Operators

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