getEntitlements static method
getEntitlements method
Implementation
static Future<EntitlementResponse> getEntitlements() async {
List<Object?>? response = await _channel.invokeMethod('getEntitlements');
if (response != null) {
List<String>? entitlements;
GenericError? error;
if (response[0] != null) {
entitlements = (response[0] as List).cast<String>();
}
if (response[1] != null) {
error = GenericError.fromJson(json.decode(response[1]!.toString()));
}
return new EntitlementResponse(entitlements, error);
}
return new EntitlementResponse(null, null);
}