Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [2.2.4] - 2025-10-15
### Updated
- Fixed issue where sum would not work for an empty list of double values

## [2.2.3] - 2024-05-21
### Updated
- Added MouseRegion for TouchFeedback for non-mobile
Expand Down
2 changes: 1 addition & 1 deletion lib/src/extension/iterable_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension IterableExtension<T> on Iterable<T> {

/// Sums the result of [valueProvider] for each item
E sum<E extends num>(E Function(T) valueProducer) {
num value = 0;
num value = (E == double ? 0.0 : 0) as E;
forEach((e) => value = (value + valueProducer(e)) as E);
return value as E;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: icapps architecture components for flutter projects. Contains commo
homepage: https://github.com/icapps/flutter-icapps-architecture
repository: https://github.com/icapps/flutter-icapps-architecture
issue_tracker: https://github.com/icapps/flutter-icapps-architecture/issues
version: 2.2.3
version: 2.2.4

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down
Loading