Skip to content

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

Notifications You must be signed in to change notification settings

NicosNicolaou16/SecureDataFlutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure Data Flutter

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

Steps

  1. Create the .env 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 Note:

For this example keeps the files with dummy/tested api key but for real project you have to add them in gitignore file.

Commands for generation

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

Versions

Flutter SDK version: 3.24.4
Dart Version: 3.5.4

References

https://pub.dev/packages/envied
https://medium.com/@r1n1os/securing-sensitive-data-in-flutter-d0a8e060a11e
https://github.com/r1n1os/Secure-Sensitive-Data-Example

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published