deleteByEntity method
Deletes an entity based on the entity object.
Parameters:
entity
: The entity to delete.
Returns:
- A Future that resolves to the deleted entity of type
T
.
Implementation
Future<T> deleteByEntity(T entity) async {
return dio
.post(
"/delete",
data: entity.toJSON(),
)
.then(
(response) => response.body<T>(),
);
}