update method

  1. @override
Future<void> update(
  1. dynamic uniqueID, [
  2. Model? model
])
override

Implementation

@override
Future<void> update(dynamic uniqueID, [Model? model]) async {
  try {
    _startLoading();
    await _fetcher.update<Model>('$_route/$uniqueID', model ?? data!);
    data = model ?? data!;
    _succeedLoading();
  } catch (e) {
    _failLoading();
    rethrow;
  } finally {
    notifyListeners();
  }
}