permissionGroups static method

Future<List<ApphudGroup>> permissionGroups()

Returns permission groups configured in Apphud dashboard > Product Hub > Products. Groups are cached on device.

Note that this method returns empty array if ProductDetails or 'SkProduct' are not yet fetched from Google Play / App Store. To get notified when permissionGroups are ready to use, use ApphudListener's paywallsDidFullyLoad method Best practice is not to use this method at all, but use paywalls() instead.

Implementation

static Future<List<ApphudGroup>> permissionGroups() async {
  List<Map<dynamic, dynamic>> groups =
      (await _channel.invokeMethod<List<dynamic>>('permissionGroups'))!
          .toMapList;
  return groups.map((json) => ApphudGroup.fromJson(json)).toList();
}