loadCollection method

  1. @override
RuntimeDynamicCollectionModel loadCollection(
  1. RuntimeDynamicCollectionModel collection, [
  2. bool once = false
])
override

Performs the process of loading a collection.

Usually, you specify a method that can be executed only the first time, such as loadOnce or listen.

If you set once to true, loadOnce is used even if the model can use listen.

Implementation

@override
RuntimeDynamicCollectionModel loadCollection(
    RuntimeDynamicCollectionModel collection,
    [bool once = false]) {
  RuntimeDatabase.registerMockData(data);
  collection.loadOnce();
  return collection;
}