unregister method

  1. @override
void unregister(
  1. HeroAnimation heroAnimation
)
override

Implementation

@override
void unregister(HeroAnimation heroAnimation) {
  final heroScope = _map[heroAnimation.tag];
  if (heroScope != null) {
    heroScope.count--;
    if (heroScope.count == 0) {
      heroScope.controller.dispose();
      _map.remove(heroAnimation.tag);
    }
  }
}