How to pass an environment variable to a flutter driver test?

Posted by Andre Scott | Updated on

If you want to pass an environment variable to a flutter driver test? I tried using Dart’s Platform.environment to read in env variables before running driver tests and it seems to work fine. Below is a simple example that sets the output directory for the test summaries using the FLUTTER_DRIVER_RESULTS env variable.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers