addConstraint method
Implementation
void addConstraint(String key,{ List<String> boundaries : const [], String mode: ""})
{
if(limits == null) limits = {"kmin": {"min": "-1", "max": "1000000"},"kplu": {"min": "-1", "max": "1000000"}};
if(key == "kmin"||key == "kplu") {
if (boundaries.length == 0 || boundaries.length < 2) {
print("boundaries($boundaries) needs to hold to vals, min, max");
return;
}
if (key == "kmin") {
//limits!["kmin"]["min"] = int.parse(boundaries[0]);
// //limits!["kmin"]["max"] = int.parse(boundaries[1]);
limits!["kmin"]["min"] = boundaries[0];
limits!["kmin"]["max"] = boundaries[1];
}
else if (key == "kplu") {
limits!["kplu"]["min"] = boundaries[0];
limits!["kplu"]["max"] = boundaries[1];
}
}
else if(key == "mode") this.vars["mode"] = mode;
}