setSandboxActive static method
For iOS platform only:
This method can be used to fetch non-synched products from appmate.
While it is true, non-synched products will also be able to fetched as a response;
otherwise, only the products successfully synched with Apple Store can be fetched.
The default parameter is false.
The isActive
value is used to activate the sandbox. While it is true,
non-synched products will also be fetched.
Callbacks BaseResponse
and GenericError in case of failure.
Implementation
/// The [isActive] value is used to activate the sandbox. While it is true,
/// non-synched products will also be fetched.
///
/// Callbacks [BaseResponse] and [GenericError] in case of failure.
static Future<BaseResponse> setSandboxActive(bool isActive) async {
List<Object?>? response =
await _channel.invokeMethod('setSandboxActive', {"isActive": isActive});
BaseResponse result = new BaseResponse(false, null);
if (response != null) {
if (response[0] != null) {
result = new BaseResponse(response[0].toString() == "true", null);
}
if (response[1] != null) {
GenericError error =
GenericError.fromJson(json.decode(response[1]!.toString()));
result = new BaseResponse(false, error);
}
return result;
}
return result;
}