read method

Future<T?> read(
  1. String id, {
  2. String? userId,
})

Reads a single entity by its ID from the primary local adapter.

Implementation

Future<T?> read(String id, {String? userId}) async {
  _ensureInitialized();
  final entity = await localAdapter.read(id, userId: userId);
  if (entity == null) return null;
  return _applyPostFetchTransforms(entity);
}