I am writing a windows application using Flutter, the application is built into an MSIX package and then distributed via the Microsoft Store.
In this app all updates will be mandatory for users to install and the UI will prevent a user from continuing into the application's home screen until an update is installed.
Currently my solution is an edge function that gets called whenever the app starts. The edge functions calls the Microsoft Submissions API. First, it gets an access token, then get my app data from the API which contains the last published submission id and if a submission is pending the id is also available, then using these ids I can fetch submission data which contains the package version number. I can't help but feel as this approach is hacky and is slow as generating the access token takes a couple of seconds.
I was wondering if there is a way to access the Windows.Services.Store namespace within flutter. Meaning how can I access these features inside flutters main.cpp. Here is the article titled Update Store-published apps from your code which is exactly what I need.
I know that dart can invoke java code and swift code so I wonder if this is possible. Thanks in advance.