ValueUpdate(Object value, { String ts, Map meta, String status, int count: 1, num sum: double.NAN, num min: double.NAN, num max: double.NAN })
Source
ValueUpdate(this.value,
{this.ts,
Map meta,
this.status,
this.count: 1,
this.sum: double.NAN,
this.min: double.NAN,
this.max: double.NAN}) {
if (ts == null) {
ts = getTs();
}
created = new DateTime.now();
if (meta != null) {
if (meta["count"] is int) {
count = meta["count"];
} else if (value == null) {
count = 0;
}
if (meta["status"] is String) {
status = meta["status"];
}
if (meta["sum"] is num) {
sum = meta["sum"];
}
if (meta["max"] is num) {
max = meta["max"];
}
if (meta["min"] is num) {
min = meta["min"];
}
}
if (value is num && count == 1) {
if (sum != sum) sum = value;
if (max != max) max = value;
if (min != min) min = value;
}
}