deleteMatch method
Removes the match and match history from the server. DEBUG ONLY, in production it is recommended the user leave it as completed.
Service Name - AsyncMatch Service Operation - Delete
@param ownerId Match owner identifier
@param matchId Match identifier
returns Future<ServerResponse>
Implementation
Future<ServerResponse> deleteMatch(
{required String ownerId, required String matchId}) {
Completer<ServerResponse> completer = Completer();
Map<String, dynamic> data = {};
data["ownerId"] = ownerId;
data["matchId"] = matchId;
ServerCallback? callback = BrainCloudClient.createServerCallback(
(response) => completer.complete(ServerResponse.fromJson(response)),
(statusCode, reasonCode, statusMessage) => completer.complete(
ServerResponse(
statusCode: statusCode,
reasonCode: reasonCode,
error: statusMessage)));
ServerCall sc = ServerCall(
ServiceName.asyncMatch, ServiceOperation.deleteMatch, data, callback);
_clientRef.sendRequest(sc);
return completer.future;
}