removeListener static method
Removes a listener for a specific state key.
key
is the identifier for the state.
listener
is the callback function to be removed.
Implementation
static void removeListener(String key, VoidCallback listener) {
_listeners[key]?.remove(listener);
}