mock method

  1. @override
ApiDocumentModel<T> mock(
  1. T mockData
)
override

Register the data for the mock.

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

Implementation

@override
ApiDocumentModel<T> mock(T mockData) {
  if (!Config.isEnabledMockup) {
    return this;
  }
  if (value == mockData) {
    return this;
  }
  value = mockData;
  notifyListeners();
  return this;
}