texture property

SpriteTexture texture

The texture this line will be drawn using.

Implementation

SpriteTexture get texture => _texture;
void texture=(SpriteTexture texture)

Implementation

set texture(SpriteTexture texture) {
  _texture = texture;

  Matrix4 matrix = Matrix4.identity();
  ImageShader shader = ImageShader(
      texture.image, TileMode.repeated, TileMode.repeated, matrix.storage);

  _cachedPaint = Paint()..shader = shader;
}