setContext static method

Future<void> setContext(
  1. String context
)

Sets the current in-app context (e.g. the active screen/section tab).

The native SDK uses this value when evaluating in-app campaign context conditions. Pass a stable identifier that matches the contexts configured on your campaigns.

Implementation

static Future<void> setContext(String context) async {
  await methodChannel.invokeMethod('setContext', <String, dynamic>{
    'context': context,
  });
}