dispose method

  1. @override
void dispose()
override

Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

Material textures must be be disposed of by the dispose() method of Texture.

Implementation

@override
void dispose(){
  super.dispose();

  children.forEach((mat){
    mat.dispose();
  });
}