products static method

Returns array of ApphudProductComposite objects that you added in Apphud > Product Hub > Products.

Implementation

static Future<List<ApphudProductComposite>> products() async {
  List<Map<dynamic, dynamic>>? products =
      (await _channel.invokeMethod<List<dynamic>>('products'))?.toMapList;
  if (products == null) return const [];
  return products.map(ApphudProductComposite.fromJson).toList();
}