listChannelMessages method

  1. @override
Future<ChannelMessageList?> listChannelMessages({
  1. required Session session,
  2. required String channelId,
  3. int limit = 20,
  4. bool? forward,
  5. String? cursor,
})
override

Implementation

@override
Future<ChannelMessageList?> listChannelMessages({
  required model.Session session,
  required String channelId,
  int limit = 20,
  bool? forward,
  String? cursor,
}) async {
  assert(limit > 0 && limit <= 100);

  _session = session;
  final res = await _api.nakamaListChannelMessages(
    channelId: channelId,
    limit: limit,
    forward: forward,
    cursor: cursor,
  );

  return ChannelMessageList()..mergeFromProto3Json(res.body!.toJson());
}