restoreGoogle method

  1. @override
Future<LinkFiveActiveProducts> restoreGoogle(
  1. List<LinkFiveRestoreGoogleItem> restoreList
)
override

RESTORE GOOGLE PLAY STORE

This will send all restored transactionIds to LinkFive We will check against apple if those transaction are valid and enable or disable a product

Implementation

@override
Future<LinkFiveActiveProducts> restoreGoogle(List<LinkFiveRestoreGoogleItem> restoreList) async {
  final uri = _makeUri("api/v1/purchases/user/google/restore");

  final body = {
    "restoreList": restoreList.map((restoreGoogleItem) {
      return restoreGoogleItem.toMap;
    }).toList(growable: false)
  };

  LinkFiveLogger.d("Restore body: $body");

  final response = await httpClient.post(uri, body: body, headers: await _headers);
  return _parseOneTimePurchaseListResponse(response);
}