unregisterInboxResponseListener method

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

Implementation

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