getFrom method
Implementation
num? getFrom(String key, int index){
switch (key) {
case "getX":
return getX(index);
case "getY":
return getY(index);
case "getZ":
return getZ(index);
default:
throw('missing $key');
}
}