Document class

Allows storage of unstructured data in a ManagedObject property.

Documents may be properties of ManagedObject table definition. They are a container for data that is a JSON-encodable Map or List. When storing a Document in a database column, data is JSON-encoded.

Use this type to store unstructured or 'schema-less' data. Example:

    class Event extends ManagedObject<_Event> implements _Event {}
    class _Event {
      @primaryKey
      int id;

      String type;

      Document details;
    }

Constructors

Document([dynamic data])
Creates an instance with an optional initial data.

Properties

data ↔ dynamic
The JSON-encodable data contained by this instance.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic keyOrIndex) → dynamic
Returns an element of data by index or key.
operator []=(dynamic keyOrIndex, dynamic value) → void
Sets an element of data by index or key.