The optOut() method sets the opt-out flag for the entire app. Once the opt-out flag is set, no data is collected.

By default, optOut(false) is set.

Syntax

await FlutterPiwikPro.sharedInstance.optOut(shouldOptOut);

Parameters

shouldOptOut (boolean, required)

Whether the opt-out flag is set. True: is set. False: is not set.

Examples

To set the opt-out flag and not collect any data:

await FlutterPiwikPro.sharedInstance.optOut(true);