layerChanged property

void Function(Part, [Layer?, Layer?])? get layerChanged

Gets or sets the function to execute when this part changes layers. It is typically used to modify the appearance of the part. This function must not change the layer of this part by setting #layerName.

If this property value is a function, it is called with three arguments, this Part, the old Layer (may be null), and the new Layer (may be null). By default this property is null -- no function is called.

Implementation

void Function(
  _i3.Part, [
  _i3.Layer?,
  _i3.Layer?,
])? get layerChanged => (
      _i3.Part p0, [
      _i3.Layer? p1,
      _i3.Layer? p2,
    ]) =>
        _i4.callMethod(
          _i4.getProperty(
            this,
            'layerChanged',
          ),
          r'call',
          [
            this,
            p0,
            p1 ?? _i5.undefined,
            p2 ?? _i5.undefined,
          ],
        );
set layerChanged (void value(Part, [Layer?, Layer?])?)

Implementation

set layerChanged(
    void Function(
      _i3.Part, [
      _i3.Layer?,
      _i3.Layer?,
    ])? value) {
  _i4.setProperty(
    this,
    'layerChanged',
    value == null ? _i5.undefined : _i4.allowInterop(value),
  );
}