getTotalScheduledMessageCount method

Future<int> getTotalScheduledMessageCount({
  1. TotalScheduledMessageCountParams? params,
  2. OnTotalScheduledMessageCountCallback? callback,
})

Get Total Scheduled Message Count

Implementation

Future<int> getTotalScheduledMessageCount({
  TotalScheduledMessageCountParams? params,
  OnTotalScheduledMessageCountCallback? callback,
}) async {
  try {
    final result = await _int.api.send(
      GroupChannelScheduledMessageTotalCountRequest(
        params: params,
      ),
    );
    if (callback != null) {
      callback(result, null);
    }

    return result;
  } catch (e) {
    if (callback != null) {
      callback(null, SBError(message: 'Failed Sending Request'));
    }

    rethrow;
  }
}