subscriptions static method
Returns an array of all subscriptions that this user has ever purchased. Subscriptions are cached on device.
Use this method if you have more than one subscription group in your app.
Implementation
static Future<List<ApphudSubscriptionWrapper>> subscriptions() async {
final List<Map<dynamic, dynamic>>? subscriptions =
(await _channel.invokeMethod<List<dynamic>>('subscriptions'))
?.toMapList;
if (subscriptions != null) {
return subscriptions
.map((json) => ApphudSubscriptionWrapper.fromJson(json))
.toList();
}
return List<ApphudSubscriptionWrapper>.of([]);
}