updateContext method
Update the context used for feature flag evaluation.
contextA Map of context properties to use for flag evaluation. This entirely replaces any previously set custom context.optionsReserved for future use. Currently not implemented by the native SDKs and will be ignored.
After setting the new context, the SDK automatically re-fetches flags from Mixpanel servers. The returned Future completes when the re-fetch is done.
Implementation
Future<void> updateContext(Map<String, dynamic> context,
{Map<String, dynamic>? options}) async {
await _channel.invokeMethod<void>('updateFlagsContext', <String, dynamic>{
'token': _token,
'context': _MixpanelHelper.ensureSerializableProperties(context),
'options': _MixpanelHelper.ensureSerializableProperties(options),
});
}