shader static method
Paints a custom fragment shader over the element — an experimental pixel post-effect.
Expands to Animation.custom(ShaderEffect(shaderName: asset, uniforms: uniforms)): the .frag at asset (registered under flutter: shaders:)
is loaded once before frame 0 and painted over the rendered element. The
shader's float slots are bound in a fixed order — resolution.x,
resolution.y, progress, then each uniforms value (a num) in
iteration order — so the GLSL contract is stable and deterministic.
A missing or invalid asset surfaces as a FluvieRenderException naming the
asset. Experimental: the surface may change, and software-rasterizer
fidelity varies by platform (goldens are pinned to the Linux baseline). The
common tail forwards verbatim.
Implementation
@experimental
static Animation shader(
String asset, {
Map<String, Object> uniforms = const {},
Time? duration,
Curve? ease,
Spring? spring,
Time delay = Time.zero,
Trigger at = Trigger.auto,
Stagger? stagger,
Repeat? repeat,
String? label,
}) => buildShader(
asset,
uniforms,
_tail(duration, ease, spring, delay, at, stagger, repeat, label),
);