remove method

void remove(
  1. String id
)

Removes the entity with id, with its selection and edit.

Implementation

void remove(String id) {
  if (!entities.any((e) => e.id == id)) return;
  entities.removeWhere((e) => e.id == id);
  if (_selected == id) _selected = null;
  if (_editing == id) _editing = null;
  notifyListeners();
}