Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

If doing custom getter/setter pair, you should ideally only have to annotate the getter #621

Closed
jakemac53 opened this issue Oct 9, 2015 · 3 comments
Labels
Milestone

Comments

@jakemac53
Copy link
Contributor

Today you have to annotate the setter as well with @reflectable :(.

example:

@PolymerRegister('my-element')
class MyElement extends PolymerElement {
  MyElement.created() : super.created();

  @property
  int get foo => _foo;
  @reflectable // ouch :(
  void set foo(int value) {
    _foo = value;
    notifyPath('foo', foo);
  }
  int _foo;
}
@Andersmholmgren
Copy link

yep that one bit me today

@eernstg
Copy link

eernstg commented Oct 14, 2015

See update on google/reflectable.dart#42.

@eernstg
Copy link

eernstg commented Oct 15, 2015

Done in commit 7800cb0a48b7cdf3561337de3374398b2980b9ba.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants