optOut method

void optOut(
  1. bool optOut
)

Sets the opt-out status for the current user.

optOut when true, stops the SDK from accepting any new event requests. When false, resumes normal SDK operation.

This method allows users to control their data collection preferences.

Implementation

void optOut(bool optOut) {
  RudderSdkPlatform.instance.optOut(optOut);
}