check if flutter web app (PWA) has already installed added to homescreen?

Viewed 275

I did a lot of searching on the internet but did not find any results for these questions Is there a way to find out in the Flutter app that this app has been added to the home screen?

1 Answers

You can check if the window is a standalone.

import 'dart:html';

final isStandAlone = window.matchMedia('(display-mode: standalone)').matches;

if (isStandAlone) {
    // Ask user to install PWA
}
Related