readAllGamification method
Method retrieves all gamification data for the player.
Service Name - Gamification Service Operation - Read
returns Future<ServerResponse>
Implementation
Future<ServerResponse> readAllGamification({required bool includeMetaData}) {
Completer<ServerResponse> completer = Completer();
Map<String, dynamic> data = {};
data[OperationParam.gamificationServiceIncludeMetaData.value] =
includeMetaData;
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.gamification, ServiceOperation.read, data, callback);
_clientRef.sendRequest(sc);
return completer.future;
}