watch method

DataStateNotifier<T?> watch({
  1. bool? remote,
  2. Map<String, dynamic>? params,
  3. Map<String, String>? headers,
  4. AlsoWatch<T>? alsoWatch,
})

Watch this model through a call equivalent to Repository.watchOne. with the current object/id.

Requires this model to be initialized.

Implementation

DataStateNotifier<T?> watch({
  bool? remote,
  Map<String, dynamic>? params,
  Map<String, String>? headers,
  AlsoWatch<T>? alsoWatch,
}) {
  _assertInit('watch');
  return remoteAdapter.watchOne(
    this,
    remote: remote,
    params: params,
    headers: headers,
    alsoWatch: alsoWatch,
  );
}