---
title: "Comment by Aman on \"Using Environment Variables with flutter_dotenv DotEnv in Flutter: Step by Step Guide\" | Hashnode"
description: "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"
url: "https://hashnode.com/posts/flutter-environment-variables-with-flutter-dotenv/66b1aea8427d64474fcf85d5/comment/66b254ffa4ae47970eb20adc"
---

[Discussion](https://hashnode.com/posts/flutter-environment-variables-with-flutter-dotenv/66b1aea8427d64474fcf85d5)

Comment [Using Environment Variables with flutter\_dotenv DotEnv in Flutter: Step by Step Guide](https://hashnode.com/posts/flutter-environment-variables-with-flutter-dotenv/66b1aea8427d64474fcf85d5)

[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?
