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