Skip to content

Custom sort function for StreamChannelListView #2170

@Jonny1987

Description

@Jonny1987

Please select which package this feature is related to

stream_chat_flutter

Which platforms would this feature impact?

Android

Is your feature request related to a problem?

I want to sort the channel list by something other than what we can currently sort by (last_updated, last_message_at, updated_at, created_at or member_count).

In my case, I want to include the channel type in the sort function so certain chanel types are always on the top

Describe the solution that you'd like

A parameter on StreamChannelListController which allows setting a comparison function to determine the order of channels.

eg:
customSortFunction: bool Function(Channel, Channel)?

Describe alternatives that you have considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions