subscribeOnConsentLost method

  1. @override
Future<void> subscribeOnConsentLost(
  1. Future handler(
    1. int consentType
    )
)
override

Implementation

@override
Future<void> subscribeOnConsentLost(
    Future<dynamic> handler(int consentType)) async {
  consentLostHandler(dynamic event) {
    handler(event);
  }

  consentLostErrorHandler(dynamic error) =>
      print('Received error: ${error.message}');
  _eventChannel
      .receiveBroadcastStream()
      .listen(consentLostHandler, onError: consentLostErrorHandler);
  await _channel.invokeMethod(
      'subscribeOnConsentLost', {'consentType': oneConsentTypeCollectData});
}