I want to create an hosted app in foundry with only a frontend asset to upload in Developer Console.
I can create this in Flutter, and this should work.
However, if I want to iframe this application in Workshop, how can I expose the right API/events to use it as a customer widget in Workshop ?
The only way you can currently bidirectionally communicate with Workshop is documented in the iframe docs, specifically the useWorkshopContext
hook provided by the workshop-iframe-custom-widget npm package.
In your Flutter app you would need to be able to use this react hook as this is how you declare the interface of values expected and how you get the values passed from Workshop along with callbacks to update those values.