execute method
Implementation
@override
Future<RawEvent> execute(RawEvent event) async {
// We need to get the Context in a concurrency safe mode to permit changes to make it in before we retrieve it
// Retrieve the current context state
final context = await analytics!.state.context.state;
// Set the instanceId for the context
context!.instanceId = instanceId;
// Set the library information for the context
context.library = ContextLibrary("journifyio-flutter", Journify.version());
// Get the device identifier (IDFV for iOS, Android ID for Android)
final deviceId = await getDeviceId();
// Set the device id for the context
context.device.id = deviceId;
// Assign the context to the event
event.context = context;
// Return the modified event
return event;
}