deleteSymbols function

Future<bool> deleteSymbols({
  1. required String appId,
  2. required String token,
  3. required String id,
})

Implementation

Future<bool> deleteSymbols({
  required String appId,
  required String token,
  required String id,
}) async {
  final url =
      'https://api.raygun.com/v3/applications/$appId/flutter-symbols/$id';
  final request = http.MultipartRequest('DELETE', Uri.parse(url));
  request.headers.addAll({
    'Authorization': 'Bearer $token',
    'Content-Type': 'multipart/form-data',
  });
  final res = await request.send();
  if (res.statusCode == 204) {
    print('Deleted: $id');
    return true;
  } else {
    print('Error deleting $id. Response code: ${res.statusCode}');
    return false;
  }
}