off method
Remove event listener from emitter. This will unsubscribe the caller from the emitter from any future events. Listener should be a valid instance.
Implementation
void off(Listener listener) {
if (null == listener) {
throw ArgumentError.notNull("listener");
}
// Check if the listner has a valid callback for cancelling the subscription.
if (null != listener.cancel) {
listener.cancel(); // Use the callback to cancel the subscription.
}
}