unregister method Null safety
- Component component
Implementation
void unregister(Component component) {
// remove component and make sure no references are kept
_unloadComponent(component);
components.removeWhere((element) => element == component);
}