$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 'key':
      final _key = $value.key;
      return _key == null ? const $null() : $Key.wrap(_key);

    case 'point':
      final _point = $value.point;
      return runtime.wrapAlways(_point);

    case 'child':
      final _child = $value.child;
      return $Widget.wrap(_child);

    case 'width':
      final _width = $value.width;
      return $double(_width);

    case 'height':
      final _height = $value.height;
      return $double(_height);

    case 'alignment':
      final _alignment = $value.alignment;
      return _alignment == null ? const $null() : $Alignment.wrap(_alignment);

    case 'rotate':
      final _rotate = $value.rotate;
      return _rotate == null ? const $null() : $bool(_rotate);
  }
  return _superclass.$getProperty(runtime, identifier);
}