Closed domizilver closed 4 years ago
Hello, This message show your apiKey is null.
Do you done these steps?
I think if you change api_key to API_KEY in .env file, it working
yes i have my api key in "API_KEY". what do you mean by create .env file in root?
you show create a file with name .env in example directory, the write your key in this file like API_KEY=XXXXXXXXXXX
you mean like this? i created key.env outside of lib folder same row as pubspec.yaml file
your file name is "key.env", should be ".env", just change name of file to ".env"
renamed to .env still no success :(
Do you run flutter pub get
?
yes, flutter clean as well
Now is working?
still not working :( received same message
you can write directly your key in this line: 37: String apiKey = DotEnv().env['API_KEY']; to String apiKey ="your-key";
still not working.
i tried my key on different google place api code and it works fine
Now , what's the problem? Can you show me error?
same error
'package:google_place/google_place.dart': Failed assertion: line 65 pos 12: 'apiKEY != null': is not true.
This error means you pass null to Google Place() for key, towmarrow I'll check again
can I see your pubspec.yaml file in example directory?
Thanks for your issue, I find the problem, if you get a new version and done 3 steps, should be working.
flutter pub get
i got this error while running the code from example.
i have my api key in 'api_key'.