title: Argument type cannot be assigned to the parameter type
body: <p>EDIT: Answered by Franken Frank helo, thank you.</p>
  <p>Im trying to send a struct to a StatefulWidget, but I'm getting the error</p>
  <pre><code>&quot;code&quot;: &quot;argument_type_not_assignable&quot;,
      &quot;message&quot;: &quot;The argument type 'RepData' can't be assigned to the parameter type 'RepScreen'.&quot;,
      
  Error Line:
  _RepScreenState createState() =&gt; _RepScreenState(product);
  
  
  The struct is RepData, and my StatefulWidget is RepScreen.
  
  class RepScreen extends StatefulWidget {
  
    final RepData product;
    RepScreen(this.product);
  
    @override
    _RepScreenState createState() =&gt; _RepScreenState(product);
  }
  
  class _RepScreenState extends State&lt;RepScreen&gt; {
  
    final RepScreen product;
    _RepScreenState(this.product);
  
    @override
    Widget build(BuildContext context) {
      return Container(   
      );
    }
  }
  </code></pre>
  <p>Here is the Struct:</p>
  <pre><code>class RepData {
  
    String category;
    String id;
    String title;
    String text;
    List image;
    double long;
    double lat;
    String link;
  
    RepData.fromDocument(DocumentSnapshot snapshot){
      id = snapshot.documentID;
      title = snapshot.data['title'];
      text = snapshot.data['text'];
      image = snapshot.data['image'];
      long = snapshot.data['long'];
      lat = snapshot.data['lat'];
      link = snapshot.data['link'];
    }
   }
  </code></pre>