Skip to content

Information that should not be written directly in code #19

@dmakwt

Description

@dmakwt

Good Practice:

If your Flutter app talks to a 3rd party API that requires an API key, it's better to add the key inside the env file, Environment variables are used to store sensitive data API credentials, and other information that should not be written directly in code. . Also, don't forget to add the env file inside .gitignore, so when you push a new commit inside your GitHub repo, no one can see your API Key.

client.options.headers['X-RapidAPI-Key'] =
'2ff233efbcmshe222fd614bca32cp1484a1jsn9e25764449e7';

For more information, you can read this article. https://codewithandrea.com/articles/flutter-api-keys-dart-define-env-files/

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