updateProperties method

void updateProperties(
  1. VisualEffectSubviewProperties newProperties
)

Updates the internal VisualEffectSubviewProperties instance.

The value of a property only gets overwritten if its value in the newProperties object is non-null.

Implementation

void updateProperties(VisualEffectSubviewProperties newProperties) {
  _currentProperties = VisualEffectSubviewProperties(
    frameWidth: newProperties.frameWidth ?? _currentProperties.frameWidth,
    frameHeight: newProperties.frameHeight ?? _currentProperties.frameHeight,
    frameX: newProperties.frameX ?? _currentProperties.frameX,
    frameY: newProperties.frameY ?? _currentProperties.frameY,
    alphaValue: newProperties.alphaValue ?? _currentProperties.alphaValue,
    cornerRadius:
        newProperties.cornerRadius ?? _currentProperties.cornerRadius,
    cornerMask: newProperties.cornerMask ?? _currentProperties.cornerMask,
    effect: newProperties.effect ?? _currentProperties.effect,
    state: newProperties.state ?? _currentProperties.state,
  );
}