removeBitmapData method Null safety

void removeBitmapData(
  1. String name,
  2. {bool dispose = true}
)

Implementation

void removeBitmapData(String name, {bool dispose = true}) {
  final resourceManagerResource = _removeResource('BitmapData', name);
  final bitmapData = resourceManagerResource?.value;
  if (bitmapData is BitmapData && dispose) {
    bitmapData.renderTexture.dispose();
  }
}