mock method

  1. @override
RuntimeCollectionModel<T> mock(
  1. List<T> mockDataList
)
override

Register the data for the mock.

Once the data for the mock is registered, it will not be changed.

Implementation

@override
RuntimeCollectionModel<T> mock(List<T> mockDataList) {
  if (!Config.isEnabledMockup) {
    return this;
  }
  if (isNotEmpty) {
    return this;
  }
  if (mockDataList.isNotEmpty) {
    addAll(mockDataList);
    notifyListeners();
  }
  return this;
}