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

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?



Solution 1:[1]

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
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DevFreeze