Skip to content

Commit 3d3618c

Browse files
committed
+ increase version, edit comments
1 parent dcdad81 commit 3d3618c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/netglade_utils/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.3.0
2+
- Add `distinct` and `distinctBy` to iterable extensions.
3+
14
## 1.2.0
25
- Add `ifEmpty` and `ifBlank` to string extensions.
36
- Remove typedefs. (private)

packages/netglade_utils/lib/src/extensions/iterable_extensions.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import 'package:collection/collection.dart';
55
typedef Selector<T, K> = K Function(T selectFrom);
66

77
extension IterableExtensions<T> on Iterable<T> {
8-
/// Returns a set containing only distinct elements from the given collection.
98
Set<T> distinct() {
109
return toSet();
1110
}
1211

13-
/// Returns a list containing only elements from the given collection having distinct keys returned by the given [selector] function. If multiple elements have the same key, first element is returned.
12+
/// Returns an iterable containing only elements from the given collection having distinct keys returned by the given [selector] function.
13+
/// If multiple elements have the same key, first element is returned.
1414
Iterable<T> distinctBy<K>(Selector<T, K> selector) {
1515
return groupBy<T, K>(this, selector)
1616
.values

packages/netglade_utils/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: netglade_utils
2-
version: 1.2.0
2+
version: 1.3.0
33
description: Dart utils used internally at netglade.
44
repository: https://github.com/netglade/flutter_core/tree/main/packages/netglade_utils
55
issue_tracker: https://github.com/netglade/flutter_core/issues

0 commit comments

Comments
 (0)