showCmpForExistingUser static method

Future<MaxCMPError?> showCmpForExistingUser()

Shows the CMP flow to an existing user. Note that this resets the user’s existing consent information.

The function returns when the flow finishes showing. On success, returns null. On failure, returns MaxCMPError.

Implementation

static Future<MaxCMPError?> showCmpForExistingUser() async {
  Map? error = await channel.invokeMethod('showCmpForExistingUser') as Map?;
  if (error == null) return null;
  return MaxCMPError.fromJson(Map<String, dynamic>.from(error));
}