VisualEffectSubviewContainer constructor
const
VisualEffectSubviewContainer({
- Key? key,
- required Widget child,
- double alphaValue = 1.0,
- double? cornerRadius,
- int cornerMask = 0xf,
- required NSVisualEffectViewMaterial material,
- NSVisualEffectViewState state = NSVisualEffectViewState.followsWindowActiveState,
- EdgeInsets padding = EdgeInsets.zero,
- VisualEffectSubviewContainerResizeEventRelay? resizeEventRelay,
Creates a VisualEffectSubviewContainer.
The alphaValue is applied to the visual effect subview. It does not affect the opacity of the child. Similarly, the padding only affects the subview, and does not affect the child either.
The cornerRadius argument specifies the radius of the visual effect view's corners. Which corners are affected is dependent on the cornerMask argument.
Usage example:
VisualEffectSubviewContainer(
material: NSVisualEffectViewMaterial.hudWindow,
cornerRadius: 32.0,
cornerMask: VisualEffectSubviewContainer.topLeftCorner +
VisualEffectSubviewContainer.topRightCorner +
VisualEffectSubviewContainer.bottomRightCorner,
child: Container(width: 128.0, height: 128.0),
);
By default, a VisualEffectSubviewContainer updates its visual effect
view whenever its build
method runs. If manual control over its update
behavior is desired, it can be supplied a
VisualEffectSubviewContainerResizeEventRelay through which its update
behavior can be controlled manually.
Implementation
const VisualEffectSubviewContainer(
{Key? key,
required this.child,
this.alphaValue = 1.0,
this.cornerRadius,
this.cornerMask = 0xf,
required this.material,
this.state = NSVisualEffectViewState.followsWindowActiveState,
this.padding = EdgeInsets.zero,
this.resizeEventRelay})
: super(key: key);