fields 0.11.5

  • Installing
  • Versions
  • 4

no longer maintained

Fields Changes


  • No longer maintained.


  • Fixed CSS classes to work with latest Dart SDK.


  • Maintenance.


  • Fixed a bug in FieldSetView to render a field's displayName instead of its name as the title (tooltip) of the element.


  • Maintenance.


  • Decoupled the fields library from the fields.mirrors library; users of the mirrors library must now explicitly import fields.mirrors and call the top-level useFieldReflection function.
  • Changed the sunflower example to not use reflection to provide an example of using the core API. The showcase example continues to use reflection as an example of using the fields.mirrors library.


  • Fixed a flood of change events introduced by 0.10.4. Reverted the change from 0.10.3 and implemented a new strategy for propagating grandchildren changes.


  • Removed extraneous value change events introduced in 0.10.3.


  • Fixed a bug in FieldSet regarding the propagation of value change events from grandchildren.


  • Added support for @Items(ReadOnly).


  • Fixed a bug where the state of toggle buttons (private field filtering and sort order) was being lost when changing the selection of an ObjectEditor.


  • Added support for lists in reflectFields; List and TypedData are no longer treated as atomicTypes. Now, by default, the items of a List will be reflected as distinct fields of the parent list. A new @Items annotation has been added as a means to declare annotations to apply to the items of an annotated list. A list may be annotated with @Items(Ignore) to avoid any reflection of its items.
  • Renamed Bit16Editor -> BitEditor and support configurable bit width via the @Range annotation; the default bit width is 16-bit. For example, to set an 8-bit width you may now apply an annotation of @Range(max: 7).


  • Changed the behavior of reflectFields such that it now reflects the fields of atomicTypes if the parent is null.


  • Added a call method (Function implementation) to the Field class to enable a shorthand for getting and setting a field's value.


  • Added a guard against non-finite numbers to the NumberEditor and RangeEditor.


  • Added an explicit implements Function clause to Transform to workaround an undefined is not a function bug in dart2js.


  • Fixed a bug where the annotations on a cached field in a FieldSet were not being updated to the annotations of the field's new value.


  • Maintenance.


  • Fixed a bug with handling of NaN in Range.check.


  • Added support for direct modification of the int value in the Bit16Editor.


  • Improved the style of the ObjectEditor further.


  • Improved the style of the ObjectEditor.


  • Restored the scrollbar (overflow-y:auto;) to the ObjectEditor.


  • Fixed a bug with refresh on field changes in the FieldView element.
  • Fixed a bug with field comparisons in the FieldSet.


  • Applied font settings from the theme to the ObjectEditor.


  • Removed the scrollbars (overflow:auto;) temporarily from the ObjectEditor as a workaround for
  • Changed the ObjectEditor to use themes from the tags package.
  • Renamed the ValueTransform class to Transform.
  • Renamed the UseValueTransform annotation to TransformType.


  • Fixed an ordering issue in the value setter of the Field class.


  • Minor bug fixes.


  • Added support for direct modification of the value in the RangeEditor.


  • Changed the FieldList to a FieldSet class that supports modification.


  • Added support for direct modification of the color value in the ColorEditor.


  • Added a Bit16Editor.


  • Added styling for optgroup to the ObjectEditor.


  • Changed the superclass of ObjectEditor to EditorView<Object>.


  • Added the check method to Range and fixed a bug in the logic.


  • Added a range check to the NumberEditor when a Range annotation is used.


  • Added the refreshOptions method to SelectEditor so that a subclass may override this method to build a custom list of options if desired.


  • Added an optional getValues function to the Values annotation to provide a mechanism for supplying dynamic values to a SelectEditor.


  • Fixed a bug when refreshing a field's children in the case where the shape of the field's value object changes.
  • Renamed event streams using the on* naming convention.


  • Updated toggle-button styling in the ObjectEditor.
  • Removed a workaround for shadow :host styling in the ObjectEditor.
  • Replaced calls to the deprecated document.register with calls to document.registerElement.


  • Added types assignable to TypedData as default atomic types for field reflection.


  • Added types assignable to Iterable as default atomic types for field reflection.


  • Decoupled the fields.model library from dart:mirrors. This was done to allow data classes to be annotated with field annotations without pulling in a transitive import of dart:mirrors (and thus leading to code bloat when compiled via dart2js). Runtime applications and tools can now share such data classes with only the tools depending on dart:mirrors. Further, it is now possible to design data using synthetic fields that may be tooled without dart:mirrors although this use case is still being worked on and the API is still very much subject to change.


  • Added support for num <-> double in the default value transforms.
  • Fixed some of the default parameters in the new Field.synthetic constructor.


  • Fixed a bug in the default field editor where it would jump to the end of the input element on each character input.
  • Clear the field editors of the previous selection when selecting a new object in the ObjectEditor.


  • Renamed selected -> selection and selectedChanged -> selectionChanged in the ObjectEditor.
  • Added the top-level atomicTypes list to the fields.model library. This provides a means to register user-defined types as exceptions to the default field reflection policy of this library.


  • Temporarily removed usage of Shadow DOM in the ObjectEditor to fix styling issues in Chrome 33; The :host selector requires the Enable experimental Web Platform features in chrome://flags which no end-user actually sets.


  • Changed the default BoolEditor implementation to a new version that scales properly.


  • Fixed an error in usage of the type parameter T in the factory constructors for Field that was caught by the vm as of Dart SDK 1.2.0.dev_02_04.


  • Added the Field.synthetic factory constructor.
  • Swapped the order of the declaredName and owner parameters in the Field.forGetter and Field.forVariable factory constructors.


  • Updated to tags version 0.5.1.


  • Moved the default field editors into the tags.model library.
  • Renamed several of the annotations to have simpler names, please consult the documentation.


  • Removed the @RuntimeType annotation that was a workaround for Dart issues 6433 and 12022, which are both resolved as of Dart SDK 1.1.0.dev_05_06.
  • Applied the Themeable mixin to ObjectEditor.
  • The new ObjectEditor factory constructor now specifies a default value for the optional parameter resources, rather than applying the most recently used resources as before.


  • Renamed FieldEditor.render -> FieldEditor.refreshElement and this method is now called from the base FieldEditor constructor using scheduleMicrotask so that concrete editors need not call it from their constructors.
  • Removed the FieldEditor.isValueReadOnly getter and merged its logic into the FieldEditor.isEnabled getter; the default editors now check isEnabled.
  • Moved the fields.model and fields.view libraries into the top-level lib/ directory to make them more accessible for direct package imports.


  • Renamed -> Field.declaredName and Field.displayName ->
  • Renamed FieldTransform -> ValueTransform and FieldTransformError -> ValueTransformError.
  • Renamed the following annotations for consistency across field annotations:
    • DisplayName -> UseName
    • FieldDescription -> UseDescription
    • ReadOnly -> UseReadOnly
    • UseFieldTransform -> UseValueTransform
  • Replaced the fieldsTheme with an optional parameter of type ObjectEditorResources in the new ObjectEditor factory constructor. If the resources are not specified the most recently used resources are reused.


  • Revert the changes from 0.2.2 and instead prefer usage of the UseFieldTransform annotation for this use case. The SelectEditor now honors the declared UseFieldTransform for option values.


  • Added support for an optional renderer function in the UseValues annotation; the SelectEditor now makes a distinction between each value and its rendered presentation, using the renderer if declared.


  • Removed an usage of Type literals in a switch statement that no longer compiles via dart2js as of SDK 1.0.2_r30821.


  • Moved the theme from its own library to fields.view; the fields.model library is now decoupled from the theme.
  • Removed support for FieldEditorResources from FieldEditor; the styling of field editor elements is best left delegated to component and application views.
  • Replaced the top-level canTransformField and transformField functions with the static methods FieldTransform.canTransform and FieldTransform.transform.


  • Changed the default BoolEditor element to a <div> (was a <span>).


  • Updated for the Dart 1.0 release.
  • Added the FieldDescription annotation and use it in the BoolEditor if it is declared on the field being edited.


  • Updated to Dart SDK 0.8.10_r29803.
  • Added a generic type parameter T to Field<T> as a means to document the underlying type of a field. The type T is asserted to be assignable from the reflected type of the underlying object in checked mode only.


  • Optimization in FieldListView render.


  • Updated to Dart SDK 0.8.7_r29341.


  • Changed ObjectEditor from a subtype of HasElement to a subtype of HtmlElement.
  • Added the @RuntimeType annotation as a workaround for Dart issues 6433 and
  1. This will be removed as soon as those issues are resolved, but in the meantime it provides a means to ship working code.


  • Updated to Dart SDK 0.7.6_r28108.
  • Added a SelectEditor and UseValues annotation.
  • Changed the Field and FieldEditor value accessors from asynchronous methods that return futures to synchronous getters and setters. The implementation now uses synchronous mirrors (InstanceMirror.getField etc...) to close issue #3. This makes the API easier to use for extending FieldEditor with your own custom editors. It is also very likely that the asynchronous mirrors API will be removed from dart:mirrors in the near future.
  • Added a UseFieldTransform annotation.
  • Changed the FieldTransform class to a concrete class that can be directly instantiated as const with given transform and optional inverse functions.


  • Updated to Dart SDK 0.7.3_r27487.
  • Renamed the asset directory from 'lib/res/' to 'lib/asset/' in preparation for pub serve; this will move up to a top-level directory 'asset/' once pub is able to serve that to the dependency graph.
  • Added Field.forGetter and Field.forVariable factory constructors; these are experimental and designed to make it easier to use FieldEditor instances outside of an ObjectEditor. For example, other data entry widgets such as a data grid might want to reuse these field editors. This is subject to change.


  • Update to tags version 0.1.9.


  • Added support for proxy objects; the fields of the selected object are reflected based on its runtimeType, which proxy classes may override.
  • Moved all of the libraries into lib/src/ and export the entire public API through the lib/fields.dart library. This provides a single import statement for applications that use this package.


  • Cleaned up the FieldEditor and Transform registration interfaces.
  • Gave more specific names to the Resources classes.
  • Added the bench package to dev_dependencies to run the unit tests.
  • Updated to Dart SDK 0.6.13_r25630.



  • More early work.


  • Initial version.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  fields: ^0.11.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:fields/fields.dart';
Version Uploaded Documentation Archive
0.11.5 Nov 24, 2015 Go to the documentation of fields 0.11.5 Download fields 0.11.5 archive
0.11.0 Jan 1, 2015 Go to the documentation of fields 0.11.0 Download fields 0.11.0 archive
0.10.2 Dec 30, 2014 Go to the documentation of fields 0.10.2 Download fields 0.10.2 archive
0.10.1 Dec 23, 2014 Go to the documentation of fields 0.10.1 Download fields 0.10.1 archive
0.9.12 Nov 2, 2014 Go to the documentation of fields 0.9.12 Download fields 0.9.12 archive
0.9.8 Sep 21, 2014 Go to the documentation of fields 0.9.8 Download fields 0.9.8 archive
0.9.1 Aug 21, 2014 Go to the documentation of fields 0.9.1 Download fields 0.9.1 archive
0.9.0 Aug 20, 2014 Go to the documentation of fields 0.9.0 Download fields 0.9.0 archive
0.8.15 Aug 14, 2014 Go to the documentation of fields 0.8.15 Download fields 0.8.15 archive
0.8.14 Aug 11, 2014 Go to the documentation of fields 0.8.14 Download fields 0.8.14 archive

All 48 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.4.0 <2.0.0