TextPositionDiagnosticsSource constructor

TextPositionDiagnosticsSource({
  1. required ValueListenable<String> text,
  2. required TextPositionDiagnosticsBuilder buildDiagnostics,
  3. bool syncImmediately = true,
})

Implementation

TextPositionDiagnosticsSource({
  required ValueListenable<String> text,
  required TextPositionDiagnosticsBuilder buildDiagnostics,
  bool syncImmediately = true,
}) : _text = text,
     _buildDiagnostics = buildDiagnostics {
  _text.addListener(_handleTextChanged);
  if (syncImmediately) {
    sync(force: true);
  }
}