| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| // WARNING: Do not edit - generated code. |
| |
| part of $LIBRARYNAME; |
| |
| $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| factory $CLASSNAME(String data) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(data); |
| $!MEMBERS |
| |
| $if DART2JS |
| @Creates('Null') // Set from Dart code; does not instantiate a native type. |
| $endif |
| StreamSubscription _textBinding; |
| |
| @Experimental |
| void bind(String name, model, String path) { |
| if (name != 'text') { |
| super.bind(name, model, path); |
| return; |
| } |
| |
| unbind('text'); |
| |
| _textBinding = new PathObserver(model, path).bindSync((value) { |
| text = value == null ? '' : '$value'; |
| }); |
| } |
| |
| @Experimental |
| void unbind(String name) { |
| if (name != 'text') { |
| super.unbind(name); |
| return; |
| } |
| |
| if (_textBinding == null) return; |
| |
| _textBinding.cancel(); |
| _textBinding = null; |
| } |
| |
| @Experimental |
| void unbindAll() { |
| unbind('text'); |
| super.unbindAll(); |
| } |
| } |