envValues property
The values that the tests need in the file of the values of an app of
the matrix (MatrixEnv.file), such as .env, by their keys, or null
if they need none.
The code of a module may read values that the developer of the app
fills in after generating it, such as the public key of a service,
which are empty in an app as smf create generates it. The tests of
the module give values for the keys of the modules that their package
keeps, such as a key that the mocks of the service take, so that the
code of the module runs in the tests as with the values of a
developer. A value takes the place of the value in the line of its
key, and null removes the line, as for a key that the developer left
out of the file, which only the tests of the values themselves need.
The matrix writes them in its runs, runMatrix and runFailingApps,
before flutter test, which it runs with the arguments of
MatrixEnv.toolArguments that give the app the values. It writes no
value into an app that addAppTestsTo adds tests to, such as one that
CI starts on a device, which takes values of CI from a file instead,
if any. A run fails when two tests of an app give a key
different values, when the app has no file of values or the file has
no line of a key, and when a value has a line break or a double quote,
which the file cannot hold. A value without white space, # or a
quote goes into the file as it is, and any other in double quotes,
which every provider of the values reads alike.
Implementation
final Map<String, String?> Function(MatrixApp app)? envValues;