Gyanendra
Gyanendra

Reputation: 35

What is the correct syntax for .env file for flutter for my API key

I am trying to make a movie database app in flutter and I am confused with the .env file. I wanna know what is the correct format for my API key.

suppose my API key is 12345 is this format correct? I am confused because my VSCode isn't highlighting this statement.

API_KEY = "12345" 

also, is any other code required? I am directing accessing only this API KEY and the tutorial I'm referring to only has one line of this API in .env file.

PS: I'm new to this area, so sorry for any mistakes.

Upvotes: 0

Views: 176

Answers (1)

Pedro Barreto
Pedro Barreto

Reputation: 401

you must not have spaces and single/double quotes in an ENV file.

in your example you should put like that:

API_KEY=12345

Upvotes: 1

Related Questions