ShaderPaint class

A pass painted by one of the project's own fragment shaders.

asset is the shader's key in the bundle — the path its pubspec declares under flutter: shaders:, and what FragmentProgram.fromAsset takes. uniforms are the author's values by name, one to four floats each (a float, a vec2, a vec3, a vec4). The renderer sets rendererUniforms itself, and a name the shader does not declare is skipped, never thrown.

Inheritance

Constructors

ShaderPaint(String asset, {Map<String, List<double>> uniforms = const {}})
const

Properties

asset → String
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uniforms → Map<String, List<double>>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
toWire() → Object
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

rendererUniforms → const Map<String, int>
What the renderer sets, by name and float count, when the shader declares it at that size: the box's logical size (the whole text, or one line), the text's own colour as straight RGBA 0–1, and scene seconds. A shader that does not declare one simply does not get it.