count method

Future<int> count(
  1. TFilter filter
)

Counts entities based on the provided filter.

Parameters:

  • filter: An instance of TFilter 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(),
      );
}