title: Updating dynamically computed property in polymer.dart
body: <p>I have a scenario where I have a property that is data-bound using polymer.dart, but it does not have its own backing field. Instead it is dynamically evaluated at run-time by logic which is dependent on a lot of other internal conditions. So when other logic dictates I want to tell the data-binding to update the value. In C#/XAML the NotifyPropertyChange does not require you to pass in old and new value so it is easy to solve this. But in polymer.dart we do need to pass old and new value always, which is not possible for a dynamically evaluated property (or at least not preferable for performance reasons). How would we handle this in polymer.dart? </p>
  
  <p>Here is a pseudo example. The question is what I should put in the ??? fields?</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>class MyBoundClass extends Observable {
  
      void run() {
          ... logic, sets values in several internal non-observable objects...
          notifyPropertyChange(#status, ???, ???);
      }
  
      String get status {
          result = ... logic, evaluates values from several internal non-observable objects...
          return result;
      }
  }
  </code></pre>
  
  <p>I guess one solution would be to simply introduce another backing field in MyBoundClass. But what I really want is just to update the binding and I don't see why it required to pass the old value. It seems to me that if you just want to update the binding, the old value is not relevant?</p>