getFrom method

num? getFrom(
  1. String key,
  2. int index
)

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');
  }
}