Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env file name #13

Open
mridul2620 opened this issue Mar 20, 2023 · 10 comments
Open

env file name #13

mridul2620 opened this issue Mar 20, 2023 · 10 comments

Comments

@mridul2620
Copy link

in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.

@Rahul0714
Copy link

in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.

Try adding flutter_dotenv: ^5.0.2 in pubspec.yaml file, it will work

@ALIRAZANOMI
Copy link

in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.

i am facing the same error have you solved it?

@SHOAIBAHMED12842
Copy link

in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.

Try adding flutter_dotenv: ^5.0.2 in pubspec.yaml file, it will work

It did not solve the error.

@SHOAIBAHMED12842
Copy link

in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.

Try adding flutter_dotenv: ^5.0.2 in pubspec.yaml file, it will work

Is .env file will be in root folder is it empty or something present in the file?

@ji4a
Copy link

ji4a commented Mar 29, 2023

Its empty. file is missing. user needs to update his repo

@mohitrajsinha
Copy link

.env file is missing

@Memie1
Copy link

Memie1 commented Jun 25, 2023

You just need to make your own with your own API_KEY

@nyck33
Copy link

nyck33 commented Jul 6, 2023

@Memie1 can you put some examples or links to urls that show how?
https://codewithandrea.com/articles/flutter-api-keys-dart-define-env-files/
It seems more involved than you make it out to be but is there a short cut?

@Memie1
Copy link

Memie1 commented Jul 8, 2023

@Memie1 can you put some examples or links to urls that show how? https://codewithandrea.com/articles/flutter-api-keys-dart-define-env-files/ It seems more involved than you make it out to be but is there a short cut?

Most of this code already does most of this work. From what I remember.

Basically, it's as simple as creating a file called '.env' alongside your pubspec.yaml and then taking your api key from the open ai website. Then write just this one line in that file:

API_KEY="YOUR_API_KEY"

In terms of links on how to do it, idk if I can find any that would actually be helpful. I'd say it's just a matter of if you've ever worked with .env files before, then it's fairly straightforward because the code from this project itself already does all the work of calling for the .env file for you, you just need to make that .env file.

If you're making the project from scratch, though, I wish you the best of luck because that's a bit beyond me.

@nyck33
Copy link

nyck33 commented Jul 8, 2023

Thanks! @Memie1 It worked!
I did not see license but am I free to refactor it to get the UI the way I want then to commercialize this if the opportunity comes up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants