frozenByIdBloc method

ModelByIdBloc<String, T> frozenByIdBloc(
  1. String id
)
inherited

Returns a loader for a single object by id that is not self-updated when the data changes at the origin.

The loader is cached for future calls with the same ID.

Implementation

ModelByIdBloc<I, T> frozenByIdBloc(I id) {
  final existing = _frozenByIdBlocs[id];
  if (existing != null) {
    return existing;
  }

  final result = createFrozenByIdBloc(id);
  _frozenByIdBlocs[id] = result;
  return result;
}