registerInboxResponseListener method

  1. @override
Future<void> registerInboxResponseListener(
  1. InboxResponseListener callback
)
override

Implementation

@override
Future<void> registerInboxResponseListener(
    InboxResponseListener callback) async {
  try {
    _callbacksById.add(callback);
    if (_callbacksById.length == 1) {
      await methodChannel.invokeMethod('registerInboxResponseListener');
    } else {
      debugPrint(
          "Skip Register Listener with Native. Active ${_callbacksById.length} registers left");
    }
  } catch (e) {
    debugPrint('Failed to Register listener with the Native SDK: $e');
  }
}