How to trigger custom actions when app is installed or upgraded

For a new version of my app, I need to make some schema changes to the user's local data.

How do I trigger an action (or any other custom code) when the app gets updated, say from version 1.2 to 1.3? In Flutter, I understand this happens in the method onUpgrade() but I'm not sure where to put this kind of code in my FF app?

Note: i'm new to FF and don't know Flutter.

2
4 replies