GlitchEffect class
A shader-based digital glitch distortion effect.
Renders random block displacement, RGB channel splitting, scanlines, and frame flicker driven by a GKController.
{@tool snippet}
GKWidget(
effect: GlitchEffect(
blockSize: 0.05,
rgbOffset: 0.01,
),
trigger: GKTrigger.auto,
)
{@end-tool}
Constructors
- GlitchEffect({double blockSize = 0.05, double rgbOffset = 0.01})
-
Creates a GlitchEffect.
const
Properties
- blockSize → double
-
The height of each glitch displacement block, in normalized UV space.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- rgbOffset → double
-
The horizontal offset for RGB channel splitting, in normalized UV space.
final
- 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.
inherited
-
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