Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Unified Diff: packages/charted/lib/core/utils/lists.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/charted/lib/core/text_metrics.dart ('k') | packages/charted/lib/locale/format/number_format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/charted/lib/core/utils/lists.dart
diff --git a/packages/charted/lib/core/utils/lists.dart b/packages/charted/lib/core/utils/lists.dart
index 02689a965f3df58936e735d8385dfe075195d481..eb9d3c5d7547cb35c1f316f9d10961c30322d140 100644
--- a/packages/charted/lib/core/utils/lists.dart
+++ b/packages/charted/lib/core/utils/lists.dart
@@ -14,14 +14,14 @@ num sum(List values) => values == null || values.isEmpty
: values.fold(0.0, (old, next) => old + next);
/// Returns the smallest number in the given list of values
-num min(Iterable values) => values == null || values.isEmpty
+num min(Iterable<num> values) => values == null || values.isEmpty
? null
- : values.fold(values.elementAt(0), math.min);
+ : values.fold(values.elementAt(0), (x, y) => math.min(x, y));
/// Returns the largest number in the given list of values
-num max(Iterable values) => values == null || values.isEmpty
+num max(Iterable<num> values) => values == null || values.isEmpty
? null
- : values.fold(values.elementAt(0), math.max);
+ : values.fold(values.elementAt(0), (x, y) => math.max(x, y));
/// Represents a constant pair of values
class Pair<T1, T2> {
« no previous file with comments | « packages/charted/lib/core/text_metrics.dart ('k') | packages/charted/lib/locale/format/number_format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698