feat(dart/transform): Add onInit and onCheck hooks in Dart

Implement `onInit` and `onCheck` hooks in pre-generated Dart change
detectors. This mirrors the changes made to the JIT change detector in
c39c8ebcd0.
This commit is contained in:
Tim Blasi
2015-06-09 15:39:48 -07:00
parent 633cf63682
commit 17c6d6a92d
3 changed files with 51 additions and 18 deletions
@@ -27,6 +27,7 @@ class _MyComponent_ChangeDetector0 extends _gen.AbstractChangeDetector {
final _gen.List<_gen.ProtoRecord> _protos;
final _gen.List<_gen.DirectiveRecord> _directiveRecords;
dynamic _locals = null;
dynamic _alreadyChecked = false;
MyComponent _context = null;
_MyComponent_ChangeDetector0(this._dispatcher, this._pipeRegistry,
@@ -44,6 +45,8 @@ class _MyComponent_ChangeDetector0 extends _gen.AbstractChangeDetector {
var changes = null;
context = _context;
_alreadyChecked = true;
}
void callOnAllChangesDone() {}
@@ -52,6 +55,8 @@ class _MyComponent_ChangeDetector0 extends _gen.AbstractChangeDetector {
mode = 'ALWAYS_CHECK';
_context = context;
_locals = locals;
_alreadyChecked = false;
}
void dehydrate() {