updateCodesText method

void updateCodesText(
  1. String text
)

Called on every textarea change — cheap even at 1,550 lines (split + trim + filter), no debounce needed for this prototype.

Implementation

void updateCodesText(String text) {
  final current = selected;
  if (current == null) return;
  draft ??= NmZoneDraft(current);
  draft!.working = draft!.working.copyWith(defCodes: parseCodeLines(text));
  notifyListeners();
}