listConversations method

Future<ConversationPage> listConversations({
  1. String status = 'all',
  2. String? after,
  3. int limit = 20,
})

The visitor's conversations, newest activity first, resolved ones included (an in-app inbox). status is all, open or resolved; pass the last id of a page as after for the next one.

Implementation

Future<ConversationPage> listConversations({String status = 'all', String? after, int limit = 20}) async {
  final token = _token;
  if (token == null) return const ConversationPage(conversations: [], hasMore: false);
  return await _api.listConversations(token: token, status: status, after: after, limit: limit);
}