addOrientationListener method
- OrientationListener listener
override
Adds an OrientationListener to the engine.
The listener is notified when a new orientation is available. Supports more than one listener. A listener is added only once.
listenerThe listener to be added.
Implementation
void addOrientationListener(OrientationListener listener) {
if (!_orientationListeners.containsKey(listener)) {
_orientationListeners[listener] = OrientationListenerBridge(listener);
}
_location.addOrientationListener(_orientationListeners[listener]!);
}