Skip to content

Multiline is not supported #96

@rsov

Description

@rsov

According to dotenv README there should be support for multiple lines. However when I try, it only loads the first one.

.env

PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
ASDASDASDASDASD
-----END PRIVATE KEY-----
"

Code:

Future main() async {
  await dotenv.load(fileName: '.env');
  print(dotenv.get("PRIVATE_KEY"));
}

Output:

flutter: "-----BEGIN PRIVATE KEY-----

I believe the bug is coming from this line:

return envString.split('\n');

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