I am trying to make a flutter web app, and when a user clicks a link to the flutter web app including authToken in the header I want to pass authToken to the flutter app and let the app do the authentication when the process is going in main.dart(before MaterialApp is called). but I don't know how to get the passed header values in main.dart.
so the process is like this:
1 a user signs in on my website
2 the backend generates authToken and keep it in the browser
3 the user clicks a link connected to the web app, and the link passes authToken in the header to the web app
4 before runApp in main.dart of the web app, the app check the validity of authToken and runApp is called only if the authToken is valid
and I want to know how to get the authToken to check the validity in main.dart. it should not be done with queryParameter but only with header. does anyone know how to do this?