title: dart method calling context
body: <p>I used the below to see how dart calls methods passed in to other methods to see what context the passed in method would/can be called under.</p>
  
  <pre class="lang-dart prettyprint-override"><code>void main() {
  
    var one = new IDable(1);
    var two = new IDable(2);
  
    print('one ${caller(one.getMyId)}');             //one 1
    print('two ${caller(two.getMyId)}');             //two 2
    print('one ${callerJustForThree(one.getMyId)}'); //NoSuchMethod Exception
  
  }
  
  class IDable{
    int id;
    IDable(this.id);
  
    int getMyId(){
      return id;
    }
  }
  
  caller(fn){
    return fn();
  }
  
  callerJustForThree(fn){
    var three = new IDable(3);
    three.fn();
  }
  </code></pre>
  
  <p>So how does <code>caller</code> manager to call its argument <code>fn</code> without a context i.e. <code>one.fn()</code>, and why does <code>callerJustForThree</code> fail to call a passed in <code>fn</code> on an object which has that function defined for it?</p>