Chat UIKit Flutter v3
Chat UIKit Flutter
Chat UIKit
Flutter
Version 3

List channels

Copy link

A channel list shows a complete list of group channels that the current user is a member of. Once a connection with Sendbird server is established, you can display and manage the channel list without complex implementation. All chat services built with Sendbird UIKit begin from the channel list.


Channel list screen

Copy link


All parameters in SBUGroupChannelListScreen constructor are optional.

Widget screen = SBUGroupChannelListScreen(
  query: GroupChannelListQuery(), // Query for GroupChannelCollection
  onGroupChannelCollectionReady: (collectionNo) {
    final collection = SendbirdUIKit.getGroupChannelCollection(collectionNo);
    // You can use the collection for this screen.
  },
  onScrollControllerReady: (scrollController) {
    // You can use the scrollController for this screen.
  },
  onCreateButtonClicked: () {
    // Move to SBUGroupChannelCreateScreen.
  },
  onListItemClicked: (channel) {
    // Move to SBUGroupChannelScreen.
  },
);

Customization

Copy link
Widget screen = SBUGroupChannelListScreen(
  customHeader: (context, theme, strings, collection) {
    // context: BuildContext
    // theme: SBUTheme
    // strings: SBUStrings
    // collection: GroupChannelCollection
    return Container(); // Return your custom header widget.
  },
  customListItem: (context, theme, strings, collection, index, channel) {
    // index: int
    // channel: GroupChannel
    return Container(); // Return your custom list item widget.
  },
  customLoadingBody: (context, theme, strings, collection) {
    return Container(); // Return your custom loading body widget.
  },
  customEmptyBody: (context, theme, strings, collection) {
    return Container(); // Return your custom empty body widget.
  },
  customErrorScreen: (context, theme, strings) {
    return Container(); // Return your custom error screen widget.
  },
);