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