toListOfDouble static method
Converts a dynamic value to a non-nullable list of doubles.
d
- The dynamic value to be converted.
Returns a list of doubles.
Implementation
static List<double> toListOfDouble(dynamic d) {
final jsonList = Convert.toListN(d);
final List<double> result = [];
if (jsonList != null) {
jsonList.forEach((e) {
final d = Convert.toDoubleN(e);
if (d != null) {
result.add(d);
}
});
}
return result;
}