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