OpacityWidgetExtension extension

Extension methods for Widget that provide convenient opacity functionality.

This extension adds methods to easily apply opacity effects to any widget. All methods return new Opacity widgets without modifying the original widget.

The extension provides both precise control (opacity with exact values) and convenient shortcuts for common opacity levels (half, quarter, transparent).

Opacity values range from 0.0 (completely transparent) to 1.0 (completely opaque).

Example usage:

Image.asset('photo.jpg')
  .opacity(0.8)  // 80% opacity
  .opacityHalf() // 50% opacity
on

Methods

opacity(double opacity, {bool alwaysIncludeSemantics = false}) Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Applies the specified opacity to the widget.
opacityHalf() Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Applies 50% opacity to the widget.
opacityInvisible() Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Makes the widget invisible.
opacityPercent(double percent) Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Applies opacity using a percentage value.
opacityQuarter() Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Applies 25% opacity to the widget.
opacityTransparent() Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Makes the widget completely transparent.
opacityZero() Opacity

Available on Widget, provided by the OpacityWidgetExtension extension

Makes the widget completely transparent (0% opacity).