byIdBloc method
Returns a loader for a single object by id
.
Returns a self-updated bloc if possible, or a frozen one otherwise.
Implementation
ModelByIdBloc<I, T> byIdBloc(I id) {
try {
return liveByIdBloc(id);
// ignore: avoid_catching_errors
} on UnimplementedError {
return frozenByIdBloc(id);
}
}