isCodeValid method

Future<BooleanResponse> isCodeValid(
  1. String sdkId,
  2. String type,
  3. String code,
  4. String? version,
)

Implementation

Future<BooleanResponse> isCodeValid(String sdkId, String type, String code, String? version) async {
	final res = await _methodChannel.invokeMethod<String>(
		'CodeApi.isCodeValid',
		{
			"sdkId": sdkId,
			"type": jsonEncode(type),
			"code": jsonEncode(code),
			"version": jsonEncode(version),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method isCodeValid");
	final parsedResJson = jsonDecode(res);
	return BooleanResponse.fromJSON(parsedResJson);
}