setUserConsentGiven static method

Future<void> setUserConsentGiven(
  1. bool enabled
)

GDPR related If user gave consent for collecting necessary extra data for Analytics. Simply call this function with True parameter the related task will be scheduled right away and will collect when needed. If for any reason user decided to undo his dialog action, or for some other reason, you wanted to cancel consent, Simply call this function with False parameter enabled enable or disable user consent for collecting extra data

Implementation

static Future<void> setUserConsentGiven(bool enabled) async {
  if(!Platform.isAndroid) return;
  return await _channel
      .invokeMethod("Pushe.setUserConsentGiven", {"enabled": enabled});
}