GKEffectComposer class

Composes multiple GKEffects into a single stacked effect.

Each effect is rendered as a layer. All effects share the same GKController provided by the hosting GKWidget. An optional blend mode controls how the layers composite together.

{@tool snippet}

GKWidget(
  effect: GKEffectComposer(
    effects: [
      GlitchEffect(blockSize: 0.04),
      AuroraEffect(speed: 0.5),
    ],
    blend: GKBlendMode.screen,
  ),
  trigger: GKTrigger.auto,
)

{@end-tool}

Inheritance

Constructors

GKEffectComposer({required List<GKEffect> effects, GKBlendMode blend = GKBlendMode.normal})
Creates a GKEffectComposer.
const

Properties

blend GKBlendMode
The blend mode applied when compositing effect layers.
final
effects List<GKEffect>
The list of effects rendered as stacked layers.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, GKController controller, {Widget? child}) Widget
Builds the widget tree for this effect.
override
dispose() → void
Override to release resources held by this effect.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited