addTexture method

void addTexture(
  1. Texture texture
)

Implementation

void addTexture(Texture texture) {
  textures
    ..removeWhere((element) => element.name == texture.name)
    ..add(texture);
}