keyOf method

dynamic keyOf(
  1. dynamic entity
)

Returns the key of the specified entity.

Implementation

dynamic keyOf(dynamic entity) =>
    registry.lookup(entity.runtimeType).getKey(entity);