commitEdit method
Commits an edit without canceling an already-running Play review.
Implementation
@override
Future<void> commitEdit({
required String packageName,
required String editId,
required bool areChangesNotSentForReview,
}) => _guard(
'commit the Google Play edit',
() async {
final uri = Uri.https(
'androidpublisher.googleapis.com',
'/androidpublisher/v3/applications/'
'${Uri.encodeComponent(packageName)}/edits/'
'${Uri.encodeComponent(editId)}:commit',
<String, String>{
'changesNotSentForReview': areChangesNotSentForReview.toString(),
'changesInReviewBehavior': 'ERROR_IF_IN_REVIEW',
},
);
final response = await _client.post(uri);
if (response.statusCode < 200 || response.statusCode >= 300) {
throw SmfError(
'Google Play rejected the edit commit '
'(HTTP ${response.statusCode}): '
'${_responseMessage(response.body)}',
SmfErrorCode.googlePlayApi,
);
}
},
);