Guys, good morning,
Can I read a Page State directly from Custom Function? I'm having an error in a simple test. Do I have to send and return the json in Actions and save the json from there?
Thanks.
Basic example done by chatGPT that FF gives me an error (I did some change manually here to simplify the variabled names. Can have something wrong in the funciton)
dynamic newCustomFunction(String eventName) {
/// MODIFY CODE ONLY BELOW THIS LINE
jsonEventsFiltered.clear();
// Filter the events by name
for (var event in jsonEvents) {
if (event['name'] == eventName) {
jsonEventsFiltered.add(event);
}
}
/// MODIFY CODE ONLY ABOVE THIS LINE
}