delete method

Future<T?> delete(
  1. Object model,
  2. {bool? remote,
  3. Map<String, dynamic>? params,
  4. Map<String, String>? headers,
  5. OnSuccessOne<T>? onSuccess,
  6. OnErrorOne<T>? onError,
  7. DataRequestLabel? label}

Deletes model of type T.

If remote is true, it will initiate an HTTP call.

Always deletes from local storage.

Arguments params and headers will be merged with _RemoteAdapter.defaultParams and _RemoteAdapter.defaultHeaders, respectively.

See also: _RemoteAdapter.urlForDelete, _RemoteAdapter.methodForDelete.


Future<T?> delete(
  Object model, {
  bool? remote,
  Map<String, dynamic>? params,
  Map<String, String>? headers,
  OnSuccessOne<T>? onSuccess,
  OnErrorOne<T>? onError,
  DataRequestLabel? label,
}) {
  return remoteAdapter.delete(
    remote: remote,
    params: params,
    headers: headers,
    onSuccess: onSuccess,
    onError: onError,
    label: label,