Skip to content

NicosNicolaou16/SecureDataFlutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure Data Flutter

Linktree Static Badge X LinkedIn Medium Mastodon Bluesky Dev.to blog YouTube Static Badge

This example project tests how we secure data in Flutter, such as API keys.

✨ Steps

  1. Create the .env file inside the main directory.
  2. Create the env.dart file.
  3. For static variable static String apiKey = _Env and run the new command (the old one deprecated) dart run build_runner build or dart run build_runner build--delete-conflicting-outputs.
  4. Generated.
  5. Add the Key static String apiKey = _Env.apiKey.

Important

For this example, keep the files with dummy/test API keys, but for a real project, you should add them to the .gitignore file.

🛠 Commands for Generation

dart run build_runner build or dart run build_runner build --delete-conflicting-outputs

🔧 Versioning

  • Flutter SDK version: 3.41.2
  • Dart Version: 3.11.0

📚 References & Tutorials

About

This example project tested how we keep secure the data in Flutter, example, api key(s).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors