How to use Environment Variables in Flutter with flutter_dotenv

  Рет қаралды 21,160

Paul Halliday

Paul Halliday

Күн бұрын

Пікірлер: 35
@murilomedeiros8132
@murilomedeiros8132 2 жыл бұрын
Really good video, short and concise. Showed everything I needed to know about the package.
@manueltylan827
@manueltylan827 6 ай бұрын
Such an excellent way to explain things. The tutorial is a whole environment variable package! Kudos!🎉
@vancityexe
@vancityexe 2 жыл бұрын
I was stuck on trying to figure this out for wayyy too long until I watched this. Thanks alot man!
@AaronKelton
@AaronKelton 3 жыл бұрын
At 8:06 are the "release modes" just another way of saying "Flutter Flavors"? If so, would you call these release modes "inline flavors"? I.e. the flavor is handled in a single file conditional rather than in main_development.dart and main_production.dart, etc. I'm trying to determine if I even need to use flutter_dotenv if I instead use flutter_flavor. Would you recommend using one instead of the other? Or can both be used together complimentary?
@paulhalliday
@paulhalliday 3 жыл бұрын
Hey Aaron! In this circumstance, this would be separate from flavors. The release/profile/debug modes can be thought of as production/development build(s) that would have specific configurations. Flavors can be thought of as specific configurations of an app, so you’d want to take advantage of environment variables here too. That specific flavor can be in release/profile/debug mode depending on whether you’re building the application for production or local development. Hope that helps!
@ezhemati
@ezhemati Жыл бұрын
that is the best solution, thank you very much
@realaliarain
@realaliarain 3 жыл бұрын
We really needed this thank you!
@paulhalliday
@paulhalliday 3 жыл бұрын
Glad it helped! Any other issues you’d like covering?
@AbinPS-ov5qp
@AbinPS-ov5qp 7 ай бұрын
Hi Paul, Is there any way to load API_KEYS from the .env file to the AndroidManifest.xml file? Can you guide me to store my GMap_API_KEY safely and retrieve it?
@yordanyordanov4466
@yordanyordanov4466 2 жыл бұрын
HI, thank you for this video. If you don't add these to source control, how would you set them during the build time?
@isurujn
@isurujn 3 жыл бұрын
Thanks for this video. Short but covers everything from basics to advanced usage gradually. What's that theme you're using btw? Looks nice.
@paulhalliday
@paulhalliday 3 жыл бұрын
I use Pop and Lock (marketplace.visualstudio.com/items?itemName=Luxcium.pop-n-lock-theme-vscode) in this video. Here’s a link to all my uses: developer.school/uses
@张哲-l5e
@张哲-l5e Жыл бұрын
Thanks. local PC works well. But when I run in GIT Actions, "Error detected in pubspec.yaml: No file or variants found for asset: .env."
@BlockCylinder
@BlockCylinder Жыл бұрын
I would love to see this addressed. The whole thing can't really be used if the app won't build in the actual production environment.
@gergesnady557
@gergesnady557 2 жыл бұрын
Really good video , thank you so mush , 💖💖💖💖
@javagladiator3476
@javagladiator3476 Жыл бұрын
awesome!!! thanks for sharing
@BlockCylinder
@BlockCylinder Жыл бұрын
I have not implemented multiple environments but I have implemented flutter_dotenv and I've created a couple of variables including an API key. My .env file is on the .gitignore list. I'm trying to deploy via Netlify, and the build is failing because there is no .env file found. I plan to follow the guide in this video but I don't think it will help with this issue, will it? How can I implement environment variables in a Flutter app that work with Netlify or similar hosting services?
@amsyary1
@amsyary1 3 жыл бұрын
great tutorial thanks man :)
@cristhianandresapolocevall8905
@cristhianandresapolocevall8905 2 жыл бұрын
Greate! Thanks, but one question. For the flutter web, what's up?
@juanmacias5922
@juanmacias5922 Жыл бұрын
in my experience flutter web doesn't like the file to be named '.env' you need to call it 'dotenv' or something similar.
@ramzez_uk
@ramzez_uk Жыл бұрын
Wouldn't including all env files in the assets leak the dev environment in production? someone disaabmeling the files can get potentially exposure to all your environments ?
@brokercl
@brokercl 2 жыл бұрын
great video thanks
@GustavoO64
@GustavoO64 10 ай бұрын
Please, i need to see the github, anyone else have the link?
@DholaSain
@DholaSain 2 жыл бұрын
What is it giving suggestions of code all around?
@juanmacias5922
@juanmacias5922 Жыл бұрын
Github Co-Pilot
@faisalfotoh1909
@faisalfotoh1909 2 жыл бұрын
please explain get_cli 1.7.1 at windos
@ferdiangunawan1237
@ferdiangunawan1237 2 жыл бұрын
Thank you
@mustafasahin7867
@mustafasahin7867 2 жыл бұрын
VS Code Theme name ? please..
@KaBiL16
@KaBiL16 Жыл бұрын
material icons
@carlosalbertobotinacarpio5650
@carlosalbertobotinacarpio5650 6 ай бұрын
awesome
@devillspdr
@devillspdr 2 жыл бұрын
why did you stop making flutter videos ?
@razifromli7828
@razifromli7828 2 жыл бұрын
tak membantu pun. dislike dislike dislike!!!
@vicenterusso
@vicenterusso 2 жыл бұрын
totally unsafe. stay away from dotenv variables. easily decodable from app
@ugochukwuumerie6378
@ugochukwuumerie6378 2 жыл бұрын
Which do you recommend then?
@DiegoPerez-qh4tm
@DiegoPerez-qh4tm 3 жыл бұрын
I needed this tutorial, thanks!!!
Deep dive into Flutter deep linking
13:22
Flutter
Рет қаралды 42 М.
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН
How to load Flutter .Env file
9:36
dbestech
Рет қаралды 695
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 222 М.
Flutter Environment Variable - dotenv in flutter (.env) #flutter
6:38
Proto Coders Point
Рет қаралды 4,6 М.
Securing Flutter Apps | OWASP Top 10 for mobile & RASP explained
21:30
Your API Keys are NOT SAFE in a native app 🤬
9:26
Simon Grimm
Рет қаралды 13 М.
Environments (Flavors) in Flutter with Codemagic CI/CD
1:02:30
Reso Coder
Рет қаралды 33 М.
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 158 М.
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Рет қаралды 867 М.
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН