BrainCloudAsyncMatch class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abandonMatch({required String ownerId, required String matchId})
→ Future<ServerResponse>
-
Marks the given match as abandoned.
-
abandonMatchWithSummaryData({required String ownerId, required String matchId, String? pushContent, required Map<String, dynamic> summary})
→ Future<ServerResponse>
-
Removes the match and match history from the server. DEBUG ONLY, in production it is recommended
the user leave it as completed.
-
completeMatch({required String ownerId, required String matchId})
→ Future<ServerResponse>
-
Marks the given match as complete.
-
completeMatchWithSummaryData({required String ownerId, required String matchId, String? pushContent, required Map<String, dynamic> summary})
→ Future<ServerResponse>
-
Removes the match and match history from the server. DEBUG ONLY, in production it is recommended
the user leave it as completed.
-
createMatch({required List<Map<String, dynamic>> jsonOpponentIds, Map<String, dynamic>? pushNotificationMessage})
→ Future<ServerResponse>
-
Creates an instance of an asynchronous match.
-
createMatchWithInitialTurn({required List<Map<String, dynamic>> jsonOpponentIds, Map<String, dynamic>? jsonMatchState, Map<String, dynamic>? pushNotificationMessage, String? nextPlayer, Map<String, dynamic>? jsonSummary})
→ Future<ServerResponse>
-
Creates an instance of an asynchronous match with an initial turn.
-
deleteMatch({required String ownerId, required String matchId})
→ Future<ServerResponse>
-
Removes the match and match history from the server. DEBUG ONLY, in production it is recommended
the user leave it as completed.
-
findCompleteMatches()
→ Future<ServerResponse>
-
Returns all matches that are in a COMPLETE state for which the player is involved.
-
findMatches()
→ Future<ServerResponse>
-
Returns all matches that are NOT in a COMPLETE state for which the player is involved.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
readMatch({required String ownerId, required String matchId})
→ Future<ServerResponse>
-
Returns the current state of the given match.
-
readMatchHistory({required String ownerId, required String matchId})
→ Future<ServerResponse>
-
Returns the match history of the given match.
-
submitTurn({required String ownerId, required String matchId, required int version, required Map<String, dynamic> jsonMatchState, String? pushNotificationMessage, String? nextPlayer, Map<String, dynamic>? jsonSummary, Map<String, dynamic>? jsonStatistics})
→ Future<ServerResponse>
-
Submits a turn for the given match.
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateMatchStateCurrentTurn({required String ownerId, required String matchId, required int version, required Map<String, dynamic> matchState, Map<String, dynamic>? statistics})
→ Future<ServerResponse>
-
Allows the current player in the game to overwrite the matchState and
statistics without completing their turn or adding to matchHistory.
-
updateMatchSummaryData({required String ownerId, required String matchId, required int version, Map<String, dynamic>? jsonSummary})
→ Future<ServerResponse>
-
Allows the current player (only) to update Summary data without having to submit a whole turn.