$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 'method':
      return $String($value.method);

    case 'url':
      return $Uri.wrap($value.url);

    case 'headers':
      return $Map.wrap($value.headers);

    case 'contentLength':
      final _contentLength = $value.contentLength;
      return _contentLength == null ? const $null() : $int(_contentLength);

    case 'persistentConnection':
      return $bool($value.persistentConnection);

    case 'followRedirects':
      return $bool($value.followRedirects);

    case 'maxRedirects':
      return $int($value.maxRedirects);

    case 'finalized':
      return $bool($value.finalized);
    case 'finalize':
      return __finalize;

    case 'send':
      return __send;
  }
  return _superclass.$getProperty(runtime, identifier);
}