getGamePlayer static method
Obtains the Player object of the current player. In the returned Player object, only the getDisplayName, getOpenId, getUnionId, and getAccessToken methods have return values. For other methods, a null value is returned.
Implementation
static Future<Player> getGamePlayer({
bool? isRequirePlayerId,
}) async {
final dynamic response = await _channel.invokeMethod(
'PlayersClient.getGamePlayer',
removeNulls(
<String, dynamic>{
'isRequirePlayerId': isRequirePlayerId,
},
),
);
return Player.fromMap(Map<dynamic, dynamic>.from(response));
}