RuntimeCollectionModel<T extends RuntimeDocumentModel> constructor

RuntimeCollectionModel<T extends RuntimeDocumentModel>(
  1. String path, [
  2. List<T>? value
])

Base class for holding and manipulating data from a runtime database as a collection of RuntimeDocumentModel.

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 List, it is possible to operate the content as it is.

Implementation

RuntimeCollectionModel(String path, [List<T>? value])
    : assert(
        !(path.splitLength() <= 0 || path.splitLength() % 2 != 1),
        "The path hierarchy must be an odd number: $path",
      ),
      _rawPath = path,
      path = path.trimQuery(),
      parameters = _getParameters(path),
      super(value ?? []);