createTexture static method
Implementation
static Texture createTexture(int textureId, TextureCreatedCallback textureCreatedCallback) {
if (!textureIds.contains(textureId)) {
textureIds.add(textureId);
SchedulerBinding.instance.addPostFrameCallback((_){
//call the callback after the Texture is attach to the hierarchy
textureCreatedCallback(textureId);
});
}
return Texture(textureId: textureId);
}