onMaterialDispose method

void onMaterialDispose(
  1. Event event
)

Implementation

void onMaterialDispose(Event event) {
  final material = event.target;
  material.removeEventListener('dispose', onMaterialDispose);
  deallocateMaterial(material);
}