configure static method

Future<void> configure(
  1. String appId
)

Implementation

static Future<void> configure(String appId) async {
  StreamSubscription subscription =
      _eventChannel.receiveBroadcastStream().listen((fastEvent) {
    String fastEventType = fastEvent.eventType?.toString() ?? "";
    String purchaseInfo = fastEvent.purchaseInfo?.toString() ?? "";
    String error = fastEvent.error?.toString() ?? "";
    print(
        "Subscription received event in dart/example: type: $fastEventType, purchaseInfo: $purchaseInfo, error: $error");

    _callbacks!(fastEvent);
  });

  // TODO cancel subscription

  return fastApi.configure(appId);
}