title: How get values/data from object
body: <p>I'm trying to get values from an object which I have filled before.</p>
  <p>Code - this is my Object class:</p>
  <pre><code>class ProductObject extends Object{
    String _entries;
  
    ProductObject(
      this._entries,
    );
  }
  </code></pre>
  <p>Now I'm trying to fill the object in my code.
  Code - here I fill the object:</p>
  <pre><code>return GestureDetector(
     onTap: () { 
       ProductObject productObject = ProductObject(
          'Any Data',
       );
  
  print('newProductObejct: ' + productObject._image.toString());
  Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; ProductDetail(productObject)));
  },
  </code></pre>
  <p>The code 'productObject._entries.toString()' is working.
  I can get the data from object.</p>
  <p>But if i would passe the object to a other display
  i can't get the object data.
  Code - this is my seconde page:</p>
  <pre><code>
  class ProductDetail  extends StatefulWidget {
    var _product_data;
    ProductDetail(this._product_data,{Key? key}) : super(key: key);
  
    @override
    _ProductDetail createState() =&gt; _ProductDetail (_product_data);
  }
  
  
  
  class _ProductDetail extends State&lt;ProductDetail &gt; {
    var _product_data;
    _ProductDetail(this._product_data);
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        
        body:
          GestureDetector(
            onTap: (){
              print('newProductObejct: ' + _product_data._image.toString());
            },child: Text('text'),),                   
      );
    }
  }
  
  </code></pre>
  <p>On the second page i got a error.
  Like this:</p>
  <ul>
  <li>The following _TypeError was thrown while dispatching a pointer event:</li>
  </ul>
  <blockquote>
  <p>type 'Null' is not a subtype of type 'String' of 'function result'</p>
  </blockquote>
  <p>How can I pass the object data to another page and call them there?</p>