unregisterTapRegion method Null safety

  1. @override
void unregisterTapRegion(
  1. RenderTapRegion region
)
override

Unregister the given RenderTapRegion with the registry.

Implementation

@override
void unregisterTapRegion(RenderTapRegion region) {
  assert(_tapRegionDebug('Region $region unregistered.'));
  assert(_registeredRegions.contains(region));
  _registeredRegions.remove(region);
  if (region.groupId != null) {
    assert(_groupIdToRegions.containsKey(region.groupId));
    _groupIdToRegions[region.groupId]!.remove(region);
    if (_groupIdToRegions[region.groupId]!.isEmpty) {
      _groupIdToRegions.remove(region.groupId);
    }
  }
}