add method

Future<void> add([
  1. T? model
])

Implementation

Future<void> add([T? model]) async {
  try {
    _startLoading();
    var res = await fetcher.add<T>(route, model ?? data);
    _handleAfterAdd(res);
    _succeedLoading();
  } catch (e) {
    _failLoading();
    _logError(e, 'add method');
    if (options.throwErrors) rethrow;
  } finally {
    notifyListeners();
  }
}