-
Notifications
You must be signed in to change notification settings - Fork 99
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
Comments
Try adding flutter_dotenv: ^5.0.2 in pubspec.yaml file, it will work |
i am facing the same error have you solved it? |
It did not solve the error. |
Is .env file will be in root folder is it empty or something present in the file? |
Its empty. file is missing. user needs to update his repo |
.env file is missing |
You just need to make your own with your own API_KEY |
@Memie1 can you put some examples or links to urls that show how? |
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. |
Thanks! @Memie1 It worked! |
in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.
The text was updated successfully, but these errors were encountered: