$getProperty method

  1. @override
$Value? $getProperty(
  1. Runtime runtime,
  2. String identifier
)

Get a property by identifier on this instance

Implementation

@override
$Value? $getProperty(Runtime runtime, String identifier) {
  switch (identifier) {
    case 'contentLength':
      return $int($value.contentLength);

    case 'encoding':
      return $Encoding.wrap($value.encoding);

    case 'bodyBytes':
      return $Uint8List.wrap($value.bodyBytes);

    case 'body':
      return $String($value.body);

    case 'bodyFields':
      return $Map.wrap($value.bodyFields);
    case 'finalize':
      return __finalize;
  }
  return _superclass.$getProperty(runtime, identifier);
}