getInsurance method

Future<Insurance> getInsurance(
  1. String sdkId,
  2. String insuranceId
)

Implementation

Future<Insurance> getInsurance(String sdkId, String insuranceId) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InsuranceApi.getInsurance',
		{
			"sdkId": sdkId,
			"insuranceId": jsonEncode(insuranceId),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getInsurance");
	final parsedResJson = jsonDecode(res);
	return Insurance.fromJSON(parsedResJson);
}