Open mridul2620 opened 1 year ago
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
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?
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.
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?
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? 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 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.
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?
in the main.dart, the line await dotenv.load(fileName: ".env"); is throwing error of "FileNotFoundError". What to do please help.