createDepot method
Create a depot
This function sends a request to the API client to create a depot. If the request is successful, it returns void. In case of an error, the error is recorded in Crashlytics and the error is rethrown.
data The data to create the depot with.
Throws an error if the request fails for any reason.
Implementation
Future<void> createDepot(Depot data) =>
_apiClient.createDepot(data.toJson()).catchError((error) {
_crashlytics?.recordError(error, StackTrace.current);
throw error;
});