I am trying to access environment variables through the browser with Dart/Dartium. I know I can't use the 'io' library. I thought I might be able to use the 'html' library based on some other posts I found, but I haven't figured it out. There is a similarly named "Platform" class in both libraries, but the version in 'html' is different and does not have an "environment" property.
Thanks.
1 Answer 1
JavaScript does not have this kind of access to the user's OS through the browser. As Dart gets compiled to JS in order to run in the browser, that means Dart shares that exact limitation.
So no, unfortunately you cannot access environment variables by using the dart:html library.
You may also find this question helpful: Javascript environment variables