The ENV File Magic: Securing Connections in Flutter | Use the Power of ENV Files in Your Flutter App

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey friends welcome to my channel so today topic is is about to make the secure Connections in the app in the secure connection secure Integrations secure API Integrations basically into your app can be achievable by the EMV file to create in the assets and uh mentions the package in the pp file this uh these implementations has a few steps so uh first of all you need to import you need to import the L Library uh as a flutter Library which name is the flutter. EnV 5.1.0 I'm using the version in your case it it could be different for you and uh the Second Step the second step is very very crucial uh you need to Define it into the main file also so if you don't Define into the main file if you don't initialize into the main file so it cause an error to you uh so this this would be difficult for for uh I will developer so uh I am just initializing the EnV file and uh in I am just creating the EnV file and this is the assets and in the assets I am just create Dov file uh right click search new search file type do EnV here is a key Point what is the key point it is so I am just moving this type of Base URL this is the my this is my base URL I am putting it in the into the EMV file so the key point is that uh you don't need to initialize with any data type like uh string BC or then you define the Define this our variable so if you if you put the like this it can't be accessed into the app so in the in the enem file we don't need to any variable any variable defined uh so this is simple type the name is equals to and your rest stram just it okay so into uh First Step you have to mention and the public spe file the package and then the second step you are initializing EnV file and from the sers and the next step is is uh you are creating the EnV file according to this path what you will do in Next Step so go to the page I am in my conditions I am just going to the product view so I am just this is the my first page the product view so I'm just here to to show you what we can what the way we we can uh redeem the EnV file data so uh I just uh I just creating the uh variable file string base URL and EnV EnV is a package is not installed so I'm just installing it and uh remove the cost because it caused the error it's showing the error and uh I need to print do EnV and uh print the base URL restart it as you can see my em file has the data HTTP fig store. API HTTP store. API so this data is printing and uh where is the my printing statement and this this is this I am just printing this statement I I can say you can see these print statement has been run and these are printing the base URL and base URL is that this is the base Ur and where is coming from uh EnV file base URL okay so where is a enem file EMV file is into the assets and into the assets so where I can Define the path into the main file where you are initializing the EnV file and the last thing which is very common and which is very useful for us so what what is the last step the last step you have to mention the your uhv file path into the gore what it will be done what it will be done from your site it will uh if you put your code into the G or into the G lab so Dov file will not be uploaded then uh it it should uh it it means as your local directory so if you want to don't push your EnV which is the standard V uh you have to mention your EnV file path into the gore file where is the gore file this is the my uh root directory into the root directory I have the Android folder and then Android directory I have the get ignore file so in this crial file you have to mention your EnV file path so myv file path is assets. EnV I just copying it and uh go to the g n file and mention here in the whole file you can mention or you can mention and before the assets you have to put the slash slash is basically shows you have the root directory you have you have a root directory root directory then assets then VNV okay so this uh this Vier slash denotes that before this directory has a root directory okay so you you need to put this Arrow uh sorry backward SL then assets then backward SL then EnV file okay so thank you so much for watching my video keep like and keep subscribe my video and if you found very successful and very helpful to you so please don't be don't forget to share it
Info
Channel: BugsBunny
Views: 1,279
Rating: undefined out of 5
Keywords: flutter shared preferences, button, figma tutorial, figma tutorial for beginners, figma tutorial app design, figma, figma for beginners, flutter, flutter ui, figma to flutter, figma ui convert to flutter ui, how, to, create, design, tutorials, basic tutorials, flutter tutorials, flutter for beginners, flutter tutorial for beginners, flutter tutorial, ui design, flutter crash course, routing in flutter, routing, navigation, navigation in flutter, slidable navigation, 100 mystery buttons
Id: dL9LGJ4YJ_4
Channel Id: undefined
Length: 6min 44sec (404 seconds)
Published: Sun Oct 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.