FragmentProgram class Null safety

An instance of FragmentProgram creates Shader objects (as used by Paint.shader) that run SPIR-V code.

This API is in beta and does not yet work on web. See for roadmap.

A current specification of valid SPIR-V is here.


hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
shader({Float32List? floatUniforms, List<ImageShader>? samplerUniforms}) Shader
Constructs a Shader object suitable for use by Paint.shader with the given uniforms.
toString() String
A string representation of this object.


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

Static Methods

compile({required ByteBuffer spirv, bool debugPrint = false}) Future<FragmentProgram>
Creates a fragment program from SPIR-V byte data as an input.