min method
Implementation
dynamic min(List<dynamic> list) {
double? min;
for (var i = 0; i < list.length; i++) {
final value = list[i];
if (value is int) {
if (min == null) {
min = value.toDouble();
continue;
}
if (value < min) {
min = value.toDouble();
continue;
}
} else if (value is double) {
if (min == null) {
min = value.toDouble();
continue;
}
if (value < min) {
min = value.toDouble();
continue;
}
}
}
min ??= 0.0;
return min;
}