---
title: "Discussion on \"Using Environment Variables with flutter_dotenv DotEnv in Flutter: Step by Step Guide\" | Hashnode"
description: "Discussion on \"Using Environment Variables with flutter_dotenv DotEnv in Flutter: Step by Step Guide\". Load and access your environment variables securely and efficiently in your Flutter applications."
url: "https://hashnode.com/posts/flutter-environment-variables-with-flutter-dotenv/66b1aea8427d64474fcf85d5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using Environment Variables with flutter\_dotenv DotEnv in Flutter: Step by Step Guide](https://mateoramirezr.hashnode.dev/flutter-environment-variables-with-flutter-dotenv?utm_source=hashnode&utm_medium=feed)

Load and access your environment variables securely and efficiently in your Flutter applications.

Aug 6, 2024 · 3 min read · mateoramirezr.hashnode.dev  
Read the article

-   [#dart](https://hashnode.com/tag/dart)
-   [#flutter](https://hashnode.com/tag/flutter)
-   [#mobile-development](https://hashnode.com/tag/mobile-development)
-   [#app-development](https://hashnode.com/tag/app-development)
-   [#environment-variables](https://hashnode.com/tag/environment-variables)
-   [#flutter-examples](https://hashnode.com/tag/flutter-examples)
-   [#devops](https://hashnode.com/tag/devops)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#best-practices](https://hashnode.com/tag/best-practices)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#backend](https://hashnode.com/tag/backend)
-   [#computer-science](https://hashnode.com/tag/computer-science)
-   [#dart-language](https://hashnode.com/tag/dart-language)
-   [#developer](https://hashnode.com/tag/developer)
-   [#coding](https://hashnode.com/tag/coding)

## Written by

[Mateo Ramirez Rubio](https://hashnode.com/@MateoRamirezR)

@MateoRamirezR · Medellín, Antioquia, COL

  
[View profile](https://hashnode.com/@MateoRamirezR)

## Responses

Markdown supported · ⌘↵ to post

[Aman](https://hashnode.com/@amandev)

[Aug 6, 2024](https://hashnode.com/posts/flutter-environment-variables-with-flutter-dotenv/66b1aea8427d64474fcf85d5/comment/66b254ffa4ae47970eb20adc)

final String baseUrl = dotenv.env\['BASE\_URL'\] ?? 'default\_url'; final String apiKey = dotenv.env\['API\_KEY'\] ?? 'default\_key';

Here in null check why default URL and key we are hiding it from outside world?
