title: Flutter web PWA install prompt from within the app
body: <p>I'm working on a Flutter Web PWA app and having trouble with triggering the Add To Home Screen prompt from within the flutter app.  I understand it can be triggered using Javascript with the code below, but how do I do this from my Flutter dart file?</p>
  
  <pre><code>buttonInstall.addEventListener('click', (e) =&gt; {
    // Hide the app provided install promotion
    hideMyInstallPromotion();
    // Show the install prompt
    deferredPrompt.prompt();
    // Wait for the user to respond to the prompt
    deferredPrompt.userChoice.then((choiceResult) =&gt; {
      if (choiceResult.outcome === 'accepted') {
        console.log('User accepted the install prompt');
      } else {
        console.log('User dismissed the install prompt');
      }
    })
  });
  </code></pre>