Texture? getTextureByName(String name) { if (textures.where((element) => element.name == name).isEmpty) return null; return textures.firstWhere((element) => element.name == name); }