8000 Add `IterableExtension.sortedByDescending` to `package:collection` · Issue #725 · dart-lang/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add IterableExtension.sortedByDescending to package:collection #725
Open
@loic-sharma

Description

@loic-sharma

Problem

To sort GitHubIssues by their updatedAt field, descending:

issues.sortedByCompare((issue) => issue.updatedAt, (a, b) => b.compareTo(a));

This is inconvenient.

Solution

Introduce a sortedByDescending helper:

issues.sortedByDescending((issue) => issue.updatedAt);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0