count method
Counts entities based on the provided filter.
Parameters:
filter
: An instance ofTFilter
to filter the entities.
Returns:
- A Future that resolves to the count of entities.
Implementation
Future<int> count(TFilter filter) async {
return dio
.post(
"/count",
data: filter.toJSON(),
)
.then(
(response) => (response.data as num).toInt(),
);
}