shader static method

Map<String, dynamic>? shader(
  1. Shader? shader
)

Returns a Shader based on the specified map.

The type key specifies the kind of shader.

A type of linear, radial, or sweep is interpreted as described by gradient; then, the gradient is compiled to a shader by applying the rect (interpreted by rect) and textDirection (interpreted as an enumValue of TextDirection) using the Gradient.createShader method.

If the type is none of these, but is not null, then the type is looked up in shaderDecoders, and if an entry is found, this method defers to that callback.

Otherwise, returns null.

Implementation

static Map<String, dynamic>? shader(Shader? shader) {
  if (shader == null) return null;
  // TODO: not implement
  throw UnimplementedError();
}