resetSkin function Null safety

Future<void> resetSkin(
  1. String uuid,
  2. String accessToken
)

Reset's the player's skin.

Implementation

Future<void> resetSkin(String uuid, String accessToken) async {
  final headers = {
    'authorization': 'Bearer $accessToken',
  };
  final response = await request(
      http.delete, _mojangApi, 'user/profile/$uuid/skin',
      headers: headers);
  if (response.statusCode == 401) {
    final data = parseResponseMap(response);
    throw AuthException(data['errorMessage']);
  }
}