isPWA method

bool isPWA()

Check if running in PWA mode

Implementation

bool isPWA() {
  try {
    return web.window.matchMedia('(display-mode: standalone)').matches;
  } catch (e) {
    return false;
  }
}