Opening Flutter Gallery web app
the user get prompted to add the app to the home screen as shown below
for both desktop

and mobile

what steps should I follow to achieve this without messing with JS (js answer)
Thank you
Opening Flutter Gallery web app
the user get prompted to add the app to the home screen as shown below
for both desktop
and mobile
what steps should I follow to achieve this without messing with JS (js answer)
Thank you
While the popup in the image that you have mentioned , that is automatic .It automatically fires up when you meet several criteria (and which are always true for flutter web apps , mentioned here) .
code :
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
which is present in index.html handles the pwa functionality