Skip to content

Instantly share code, notes, and snippets.

@sendbird-community
Created April 23, 2021 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sendbird-community/328e527b947d7020fbd9cf5337e4b348 to your computer and use it in GitHub Desktop.
Save sendbird-community/328e527b947d7020fbd9cf5337e4b348 to your computer and use it in GitHub Desktop.
Flutter | Get user channels
Future<List<GroupChannel>> getGroupChannels() async {
try {
final query = GroupChannelListQuery()
..includeEmptyChannel = true
..order = GroupChannelListOrder.latestLastMessage
..limit = 15;
return await query.loadNext();
} catch (e) {
print('getGroupChannels: ERROR: $e');
return [];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment