title: How does one send arguments to an embedded Flutter web app?
body: <p>As instructed <a href="https://flutter.dev/docs/deployment/web#embedding-a-flutter-app-into-an-html-page" rel="nofollow noreferrer">here</a>, one can embed a Flutter web app into a web page by wrapping it into an <strong>iframe</strong> element, such as:</p>
  
  <pre><code>&lt;iframe src="URL"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>where the URL points to the html of the Flutter web app.</p>
  
  <p>Now, what if you wanted to pre-configure the Flutter web app depending on the context - make it aware of some external value present in the embedder (the iframe HTML element or the parent web page / window).</p>
  
  <p>Is there perhaps a solution where you could instruct Flutter to read a data attribute from the iframe? For example:</p>
  
  <pre><code>&lt;iframe src="URL" data-answer="42"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>Any alternatives?</p>
  
  <p>(A broader question would be two-way communication between the embeddable and the embedder.)</p>