watchOne method
Watches changes on model of type T
by id
in local storage.
Optionally alsoWatch
es selected relationships of this model.
Example: Watch Book
with id=1
and its Author
relationship.
bookRepository.watchOne('1', alsoWatch: (book) => [book.author]);
When called, will in turn call findAll with remote
, params
, headers
.
Implementation
DataStateNotifier<T?> watchOne(
dynamic id, {
bool? remote,
Map<String, dynamic>? params,
Map<String, String>? headers,
AlsoWatch<T>? alsoWatch,
}) {
return remoteAdapter.watchOne(
id,
remote: remote,
params: params,
headers: headers,
alsoWatch: alsoWatch,
);
}