Skip to content

DistinctUnique does not filter unique string when 'equals' parameter is provided #503

@Santosh07

Description

@Santosh07

Stream.fromIterable(['Alpha', 'Beta', 'Gamma']).distinctUnique( equals: (e1, e2) { return e1.length == e2.length; }).listen((event) { print(event); });

The output is : Alpha beta Gamma

Expected Output: Since distinceUnique is performing equality based on length of string, the output should be 'Alpha beta' only.

There is no difference in functionality in 'distinctUnique' and 'distinct' when parameter is provided.

Version: 0.24.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions