PixelateEffect class

A shader-based pixelation effect.

Snaps pixels to a grid, creating a mosaic / low-resolution look with optional color quantization and animated pixel size pulsing.

{@tool snippet}

GKWidget(
  effect: PixelateEffect(
    pixelSize: 8.0,
    animate: true,
  ),
  trigger: GKTrigger.auto,
)

{@end-tool}

Inheritance

Constructors

PixelateEffect({double pixelSize = 8.0, bool animate = true})
Creates a PixelateEffect.
const

Properties

animate bool
Whether the pixel size pulses with time for an animated effect.
final
hashCode int
The hash code for this object.
no setterinherited
pixelSize double
The size of each pixel block in logical pixels.
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