removeListener method Null safety
- VoidCallback listener
override
Remove a previously registered closure from the list of closures that the object notifies.
Implementation
@override
void removeListener(VoidCallback listener) {
super.removeListener(listener);
if (!hasListeners) {
WidgetsBinding.instance.removeObserver(this);
}
}