title: Reference of Getter/Setter functions
body: <p>I have the following variable and getter / setter defined in my data model:</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>class Actor {
      int _x;
      int get x =&gt; _x;
      set x(int value) =&gt; _x = value;
  }
  </code></pre>
  
  <p>And there is this generic class that requires a getter / setter function pointer</p>
  
  <pre class="lang-dart prettyprint-override"><code>class PropertyItem {
     var getterFunction;
     var setterFunction;
     PropertyItem(this.getterFunction, this.setterFunction);
  }
  </code></pre>
  
  <p>How do i pass a reference of the getter / setter function of X to the PropertyItem class?</p>
  
  <pre class="lang-dart prettyprint-override"><code>// Something like this
  var item = new PropertyItem(x.getter, x.setter);
  </code></pre>
  
  <p>EDIT: Updated with a more clear question</p>