convertStringIntoDoubleList function

List<double> convertStringIntoDoubleList(
  1. String string
)

Implementation

List<double> convertStringIntoDoubleList(String string) {
  List<String> stringList = [];
  List<double> doubleList = [];

//convert the String into a list of Strings
  stringList = convertStringIntoStringList(string);

  //then convert the list of String into a list of double
  for (String s in stringList) {
    doubleList.add(double.tryParse(s) ?? 0.0);
  }

  return doubleList;
}