endEdit method

void endEdit()

Close the editor keeping what was typed. An empty string removes the entity; anything else stays selected.

Implementation

void endEdit() {
  final entity = byId(_editing);
  if (entity == null) return;
  _editing = null;
  _preEdit = null;
  if (entity.text.isEmpty) {
    remove(entity.id);
    return;
  }
  notifyListeners();
}