You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the methods optInTracking and optOutTracking they return fairly instantly as they have return type void. This means that checking the status of tracking later on with hasOptedOutTracking might return a ''wrong'' value if called too soon. This could be prevented by just returning the future from the method channel call. (Assuming they handle everything properly and only return after completing.
Essentially what I'm asking for is if:
/// Use this method to n
/// opt-in an already opted-out user from tracking. People updates and track
/// calls will be sent to Mixpanel after using this method.
/// This method will internally track an opt-in event to your project.
void optInTracking() {
_channel.invokeMethod<void>('optInTracking');
}
/// Use this method to opt-out a user from tracking. Events and people updates that haven't been
/// flushed yet will be deleted. Use flush() before calling this method if you want
/// to send all the queues to Mixpanel before.
///
/// This method will also remove any user-related information from the device.
void optOutTracking() {
_channel.invokeMethod<void>('optOutTracking');
}
Can be changed to
/// Use this method to n
/// opt-in an already opted-out user from tracking. People updates and track
/// calls will be sent to Mixpanel after using this method.
/// This method will internally track an opt-in event to your project.
Future<void> optInTracking() async {
return _channel.invokeMethod<void>('optInTracking');
}
/// Use this method to opt-out a user from tracking. Events and people updates that haven't been
/// flushed yet will be deleted. Use flush() before calling this method if you want
/// to send all the queues to Mixpanel before.
///
/// This method will also remove any user-related information from the device.
Future<void> optOutTracking() async {
return _channel.invokeMethod<void>('optOutTracking');
}
Maybe there are certain considerations I'm unaware off, please let me know what you think.
The text was updated successfully, but these errors were encountered:
When using the methods optInTracking and optOutTracking they return fairly instantly as they have return type void. This means that checking the status of tracking later on with hasOptedOutTracking might return a ''wrong'' value if called too soon. This could be prevented by just returning the future from the method channel call. (Assuming they handle everything properly and only return after completing.
Essentially what I'm asking for is if:
Can be changed to
Maybe there are certain considerations I'm unaware off, please let me know what you think.
The text was updated successfully, but these errors were encountered: