onOrientationchange function

bool onOrientationchange(
  1. EventListener listener
)

Attaches listener to orientationchange event.

Implementation

bool onOrientationchange(EventListener listener) {
  try {
    window.addEventListener('orientationchange', listener);
    return true;
  } catch (e, s) {
    print(e);
    print(s);
    return false;
  }
}