getFieldValue method

dynamic getFieldValue(
  1. int fieldID
)
override

Get a field's value by fieldId. Primitive types will be wrapped in the appropriate "boxed" types.

Implementation

getFieldValue(int fieldID) {
  switch (fieldID) {
    case ERROR_CODE:
      return this.error_code;
    case LATENCY_IN_US:
      return this.latency_in_us;
    case DATA:
      return this.data;
    case SPACE_NAME:
      return this.space_name;
    case ERROR_MSG:
      return this.error_msg;
    case PLAN_DESC:
      return this.plan_desc;
    case COMMENT:
      return this.comment;
    default:
      throw new ArgumentError("Field $fieldID doesn't exist!");
  }
}