RuntimeDocumentModel<T> constructor

RuntimeDocumentModel<T>(
  1. String path,
  2. T initialValue
)

Base class for holding and manipulating data from a runtime database as a document of T.

The runtime database is a Json database. Specify a path to specify the location of the contents.

In addition, since it can be used as Map, it is possible to operate the content as it is.

Implementation

RuntimeDocumentModel(this.path, T initialValue)
    : assert(
        !(path.splitLength() <= 0 || path.splitLength() % 2 != 0),
        "The path hierarchy must be an even number: $path",
      ),
      super(initialValue);