You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run dart run build_runner build to update my drift database, envied_generator also regenerates the .env.g.dart file. However, when the .env file is missing, it generates a .env.g.dart file with empty values. Is it possible to prevent this? I would like to keep the existing file in that case, if possible.
Hm, if anything this should throw an exception rather than keeping the previous .env.dart file.
Sorry, I meant the .env.g.dart file. I’ve corrected the question. I have the .env file, but the other collaborators only receive the generated file; whenever a new build occurs, they have to replace that generated file with a backup. This happens all the time.
Hmm... So, if I understand this correctly, you git track the .env.g.dart file but not the .env file and when the other devs run the generator their .env.g.dart file gets overwritten?
Hmm... So, if I understand this correctly, you git track the .env.g.dart file but not the .env file and when the other devs run the generator their .env.g.dart file gets overwritten?
Yeah. Then they always forget to copy the file back and compile the app, only to get an error message later about the blank fields. I want to solve this problem so I can stop wasting time.
Activity
techouse commentedon Aug 21, 2026
Hey!
Hm, if anything this should throw an exception rather than keeping the previous .env.dart file.
AndreLuizNogueira commentedon Aug 22, 2026
Sorry, I meant the
.env.g.dartfile. I’ve corrected the question. I have the.envfile, but the other collaborators only receive the generated file; whenever a new build occurs, they have to replace that generated file with a backup. This happens all the time.techouse commentedon Aug 22, 2026
Hmm... So, if I understand this correctly, you git track the .env.g.dart file but not the .env file and when the other devs run the generator their .env.g.dart file gets overwritten?
AndreLuizNogueira commentedon Aug 22, 2026
Yeah. Then they always forget to copy the file back and compile the app, only to get an error message later about the blank fields. I want to solve this problem so I can stop wasting time.