-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
setLoggingEnabled is currently only implemented for native iOS and Android channels, because those native platforms already have an existing method that directly maps to setLoggingEnabled. Web does not, but similar functionality can be achieved via the set_config method in the JavaScript library where we can set the debug option to true or false. For example:
// Enable debug logging at runtime
mixpanel.set_config({debug: true});
// Disable debug logging at runtime
mixpanel.set_config({debug: false});
A similar pattern already exists for setServerURL on web which actually calls set_config in the JS library:
void handleSetServerURL(MethodCall call) {
Map<Object?, Object?> args = call.arguments as Map<Object?, Object?>;
String serverURL = args['serverURL'] as String;
set_config(safeJsify({'api_host': serverURL}));
}
This issue is to extend setLoggingEnabled support to the Flutter Web channel following that pattern.
Copilot
Metadata
Metadata
Assignees
Labels
No labels