Skip to content

env variables are not passed to dart vm #165

Closed
@GioPan04

Description

@GioPan04

The env variables defined in the host system are not passed to the dartvm.

Example:

void main() {
  final String user = Platform.environment['USER'];
  print(user);
}

This will output null.

Since you can't build a bundle with --dart-define, there is any way to pass a env variable to the flutter app?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions