count method
Returns a number of messages after from.
If from is null
, it's treated as Timetoken(1)
.
to parameter is disregarded.
Implementation
Future<int> count() async {
var result = await defaultFlow(
keyset: _keyset,
core: _core,
params: CountMessagesParams(_keyset,
channels: {_channel.name},
timetoken: from ?? Timetoken(BigInt.one)),
serialize: (object, [_]) => CountMessagesResult.fromJson(object));
return result.channels[_channel.name]!;
}