dartx
dartx copied to clipboard
Add positional `isAscending` to sortedBy
sortedBy
is one of the best extensions of dartx
.
SortedList
class allows us to sort, and uses the internal order
int to decide whether it is ascending or not.
This PR simplifies this process so we can simply decide it based on isAscending
positional boolean in the sortedBy
extension.
This is useful, because without it, we would have to do additional operations bringing either more boilerplate or additional computations. By adding this positional boolean we can make it straightforward.
- Added tests ✅
- Retrocompatible ✅
- Not a breaking change ✅