id method

String id(
  1. T? item
)

Returns an unique id for item.

Implementation

String id(T? item) {
  if (item == null) return '';
  if (!_ids.containsKey(item)) {
    _ids[item] = _idGenerator.nextId();
  }
  return _ids[item] ?? '';
}