env.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // lib/env/env.dart
  2. import 'package:envied/envied.dart';
  3. part 'env.g.dart';
  4. /// The environment variables are defined in `.env` file that is located in the
  5. /// appflowy_flutter.
  6. /// Run `dart run build_runner build --delete-conflicting-outputs`
  7. /// to generate the keys from the env file.
  8. ///
  9. /// If you want to regenerate the keys, you need to run `dart run
  10. /// build_runner clean` before running `dart run build_runner build
  11. /// --delete-conflicting-outputs`.
  12. /// Follow the guide on https://supabase.com/docs/guides/auth/social-login/auth-google to setup the auth provider.
  13. ///
  14. @Envied(path: '.env')
  15. abstract class Env {
  16. @EnviedField(
  17. obfuscate: true,
  18. varName: 'SUPABASE_URL',
  19. defaultValue: '',
  20. )
  21. static final String supabaseUrl = _Env.supabaseUrl;
  22. @EnviedField(
  23. obfuscate: true,
  24. varName: 'SUPABASE_ANON_KEY',
  25. defaultValue: '',
  26. )
  27. static final String supabaseAnonKey = _Env.supabaseAnonKey;
  28. @EnviedField(
  29. obfuscate: true,
  30. varName: 'SUPABASE_JWT_SECRET',
  31. defaultValue: '',
  32. )
  33. static final String supabaseJwtSecret = _Env.supabaseJwtSecret;
  34. }
  35. bool get isSupabaseEnable => false;
  36. // Env.supabaseUrl.isNotEmpty &&
  37. // Env.supabaseAnonKey.isNotEmpty &&
  38. // Env.supabaseKey.isNotEmpty &&
  39. // Env.supabaseJwtSecret.isNotEmpty &&
  40. // Env.supabaseDb.isNotEmpty &&
  41. // Env.supabaseDbUser.isNotEmpty &&
  42. // Env.supabaseDbPassword.isNotEmpty &&
  43. // Env.supabaseDbPort.isNotEmpty;