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 ERROR_MSG:
      return this.error_msg;
    case SESSION_ID:
      return this.session_id;
    case TIME_ZONE_OFFSET_SECONDS:
      return this.time_zone_offset_seconds;
    case TIME_ZONE_NAME:
      return this.time_zone_name;
    default:
      throw new ArgumentError("Field $fieldID doesn't exist!");
  }
}