title: Can i use two iframes on Flutter web?
body: <p>I'm new in Flutter and i'm developing a little web page for learn.
  I wanna put a google map and facebook feed using two iframe.</p>
  <p>I base my code on Wangoo's code here:
  <a href="https://medium.com/flutter-community/flutter-web-and-iframe-f26399aa1e2a" rel="nofollow noreferrer">https://medium.com/flutter-community/flutter-web-and-iframe-f26399aa1e2a</a></p>
  <p>If i use only one iframe it works perfect but if i use a second one it has the first's source and the first one doesn't show anything. Like this:
  <a href="https://imgur.com/a/eWq2GU5" rel="nofollow noreferrer">https://imgur.com/a/eWq2GU5</a></p>
  <p>Already test some others packages but the most isn't web compatible or just can't use an iframe with link like those ones</p>
  <p><em>This is my code:</em></p>
  <pre><code>import 'package:flutter/material.dart';
  
  //ignore: avoid_web_libraries_in_flutter
  import 'dart:html';
  import 'dart:ui' as ui;
  
  void main() =&gt; runApp(new MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'Flutter Demo',
        theme: new ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: new MyHomePage(title: 'Flutter Demo Home Page'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
  
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; new _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
  
    String linkMaps = 'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d10500.899078315058!2d2.29133003705264!3d48.853924135746475!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47e6701f7e8337b5%3A0xa2cb58dd28914524!2sEiffel%20Tower%2C%20Par%C3%ADs%2C%20Francia!5e0!3m2!1ses-419!2smx!4v1597383453609!5m2!1ses-419!2smx';
    String linkFB = 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FTourEiffel&amp;tabs=timeline&amp;width=340&amp;height=500&amp;small_header=false&amp;adapt_container_width=true&amp;hide_cover=false&amp;show_facepile=true&amp;appId';
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),
        ),
      body:  Container(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(color: Colors.red, child: new IframeScreen(400, 400, linkMaps)),
            Container(color: Colors.blue, child: new IframeScreen(340, 400, linkFB))
          ],
        ),
      )
      );
    }
  }
   
  //--------------------------------------------------------------------------I
  //Code based on: Aseem Wangoo (Mar-22)                                      I
  //https://medium.com/flutter-community/flutter-web-and-iframe-f26399aa1e2a  I
  //--------------------------------------------------------------------------I
  
  // ignore: must_be_immutable
  class IframeScreen extends StatefulWidget {
    double w;
    double h;
    String src;
  
    IframeScreen(double _w, double _h, String _src){
      this.w = _w;
      this.h = _h;
      this.src = _src;
    }
  
    @override
    _IframeScreenState createState() =&gt; _IframeScreenState(w, h, src);
  }
  
  
  class _IframeScreenState extends State&lt;IframeScreen&gt; {
    Widget _iframeWidget;
    final IFrameElement _iframeElement = IFrameElement();
    double _width;
    double _height;
    String _source;
  
    _IframeScreenState(double _w, double _h, String _src){
      _width = _w;
      _height = _h;
      _source = _src;
    }
  
    @override
    void initState() {
      super.initState();
      _iframeElement.src = _source;
      _iframeElement.style.border = 'none';
  
      // ignore: undefined_prefixed_name
      ui.platformViewRegistry.registerViewFactory(
        'iframeElement',
      (int viewId) =&gt; _iframeElement,
      );
  
      _iframeWidget = HtmlElementView(
        key: UniqueKey(),
        viewType: 'iframeElement',
      );
    }
  
  
    @override
    Widget build(BuildContext context) {
      return SizedBox(
        height: _height,
        width: _width,
        child: _iframeWidget,
      );
    }
  }
  </code></pre>
  <p>Thanks :)</p>