Custom HTML tags, data binding, and templates for building structured, encapsulated, client-side web apps.
Polymer.dart, the next evolution of Web UI, is an in-progress Dart port of the Polymer project. Polymer.dart compiles to JavaScript and runs across the modern web.
To use polymer.dart in your application,
first add a
dependency
to the app's pubspec.yaml file.
Instead of using the open-ended any
version specifier,
we recommend using a range of version numbers, as in this example:
dependencies:
polymer: '>=0.7.1 <0.8'
Then import the library into your application:
import 'package:polymer/polymer.dart';
Polymer.dart homepage: Example code, project status, and information about how to get started using Polymer.dart in your apps.
polymer.dart package: More details, such as the current major release number.
Upgrading to Polymer.dart: Tips for converting your apps from Web UI to Polymer.dart.
We only ever need one instance of the _InitMethod
class, this is it.
const _InitMethod()
Use @observable
to make a field automatically observable, or to indicate
that a property is observable. This only works on classes that extend or
mix in Observable
.
const ObservableProperty()
Use this annotation to publish a property as an attribute.…
const PublishedProperty()
This can be used to retain any properties that you wish to access with
Dart's mirror system. If you import package:observe/mirrors_used.dart
, all
classes or members annotated with @reflectable
wil be preserved by dart2js
during compilation. This is necessary to make the member visible to
PathObserver
, or similar systems, once the code is deployed, if you are
not doing a different kind of code-generation for your app. If you are using
polymer, you most likely don't need to use this annotation anymore.
const Reflectable()
const _WhenPolymerReady()
An observable version of window.location.hash
.
Deprecated use class="{{ binding }}"
in your HTML instead. It will also
work on a <polymer-element>
.…
Configures initPolymer making it optimized for deployment to the internet.
Additionally, after this method is called initPolymer omits the Zone
that automatically invokes Observable.dirtyCheck.
Initializes a polymer application as follows: * if running in development mode, set up a dirty-checking zone that polls…
Forwards an observable property from one object to another. For example:…
Starts polymer by hooking the polymer.js code. Note: this function is not meant to be invoked directly by application developers. It is invoked by initPolymer.
Converts the Iterable
or Map
to an ObservableList or ObservableMap,
respectively. This is a convenience function to make it easier to convert
literals into the corresponding observable collection type.…
Deprecated use CssClassSet.toggle
instead.…
The auto-binding-dart
element extends the template element. It provides a
quick and easy way to do data binding without the need to setup a binding
delegate or use the templateBind
call. Both data and event handlers can be
bound using the model.…
An object that can be data bound.
Mixin and base class for implementing an Observable object that performs its own change notifications, and does not need to be considered by Observable.dirtyCheck.…
Records a change to an Observable.
CompoundObserver is a Bindable object which knows how to listen to multiple values (registered via addPath or addObserver) and invoke a callback when one or more of the values have changed.…
Use this to create computed properties that are updated automatically. The annotation includes a polymer expression that describes how this property value can be expressed in terms of the values of other properties. For example:…
Automatically registers a polymer element.
Annotation for a dart library which injects an html import into the current html document. The imported file must not contain any dart script tags, as they cannot be dynamically loaded.
An object accepted by PropertyPath where properties are read and written
as indexing operations, just like a Map
.
A summary of an individual change to a List
.…
Observes a path starting from each item in the list.
Represents an object with observable properties. This is used by data in model-view architectures to notify interested parties of changes to the object's properties (fields or getter/setter pairs).…
An observable box that holds a value. Use this if you want to store a single value. For other cases, it is better to use ObservableList, ObservableMap, or a custom Observable implementation based on Observable. The property name for changes is "value".
Represents an observable list of model values. If any items are added, removed, or replaced, then observers that are listening to changes will be notified.
Represents an observable map of model values. If any items are added, removed, or replaced, then observers that are listening to changes will be notified.
An annotation that is used to make a property observable. Normally this is used via the observable constant, for example:…
Use this type to observe a property and have the method be called when it changes. For example:…
ObserverTransform is used to dynamically transform observed value(s).…
A data-bound path starting from a view-model or model object, for example
foo.bar.baz
.…
The mixin class for Polymer elements. It provides convenience features on top of the custom elements web standard.…
Warning this class is experimental and subject to change.…
Base class for PolymerElements deriving from HtmlElement.…
A mixin for a BindingDelegate
to add Polymer event support.
This is included in PolymerExpressions.
An extension of polymer_expressions.PolymerExpressions
that adds support
for binding events using on-eventName
using PolymerEventBindings.
Like Timer
but can be restarted, and if no duration is supplied uses
window.requestAnimationFrame
instead of a 0-duration timer.
A change record to a field of an observable object.
A dot-delimieted property path such as "foo.bar" or "foo.10.bar".…
An annotation used to publish a field as an attribute. See published.
An annotation that is used to make a type or member reflectable. This makes
it available to PathObserver
at runtime. For example:…