简体   繁体   中英

Polymer.dart <property>Changed Functionality Not Working With Map

I am building a Dart app using Polymer.dart. I have a map in my polymer element as follows:

@observable Map theData = toObservable({
  'name':   '',
  'phone':  '',
  'email':  ''
});

...and have the following method set up:

theDataChanged() {
  // ...
}

However, theDataChanged() function is not called after the following operations are made:

theData['name'] = 'test1';
theData.putIfAbsent('new', () => 'test2');

Are the <property>Changed() methods not supported for Map s?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM