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
Clevertap not return native display after completing the future of recordEvent but it worked when i wait for 3 seconds after the recordEvent and before getAllDisplayUnit()
#96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Hey @lalit3102 , Is there any reason why are you calling logEvent and CleverTapPlugin.getAllDisplayUnits() asynchronously? Can you try calling both the methods sequentially and check whether CleverTapPlugin.getAllDisplayUnits() is called without adding any delay?
static Future logEvent(String eventName, {Map<String, dynamic>? eventData}) async {
await CleverTapPlugin?.recordEvent(eventName, eventData ?? {});
}
not working
logEvent(CTEvents.researchTabOpened).then((value) async {
print("Success~~~~ ");
List? displayUnits = await CleverTapPlugin.getAllDisplayUnits();
print("Display Units = " + displayUnits.toString());
});`
Working
logEvent(CTEvents.researchTabOpened).then((value) async {
print("Success~~~~ ");
await Future.delayed(Duration(seconds: 3));
List? displayUnits = await CleverTapPlugin.getAllDisplayUnits();
print("Display Units = " + displayUnits.toString());
});
The text was updated successfully, but these errors were encountered: