sync method
Recomputes diagnostics from the current text source.
Implementation
void sync({bool force = false}) {
if (_disposed) return;
final currentText = _text.value;
if (!force && currentText == _lastText) {
return;
}
_lastText = currentText;
final next = _buildDiagnostics(currentText).toList(growable: false);
if (_diagnosticListsEqual(_value, next)) {
return;
}
_value = next;
notifyListeners();
}