title: Proper syntax for directly printing instance properties to console in Dart (not simply printing a variable that is in scope)
body: <p>In Dart/Flutter, suppose you have an instance <em>a</em> of Class <em>Y</em>.  </p>
  
  <p>Class <em>Y</em> has a property, <em>property1</em>.</p>
  
  <p>You want to print that property using string interpolation like so:</p>
  
  <pre><code>print('the thing I want to see in the console is: $a.property1');
  </code></pre>
  
  <p>But you can't even finish typing that in without getting an error.</p>
  
  <p>The only way I can get it to work is by doing this:</p>
  
  <pre><code>var temp = a.property1;
  print ('the thing I want to see in the console is: $temp');
  </code></pre>
  
  <p>I haven't found the answer online... and me thinks there must be a way to just do it directly without having to create a variable first.</p>