2023-11-28 02:54:31 +00:00
// lib/env/env.dart
import ' package:appflowy/env/cloud_env.dart ' ;
import ' package:envied/envied.dart ' ;
part ' env.g.dart ' ;
@ Envied ( path: ' .env ' )
abstract class Env {
2023-11-30 21:47:12 +00:00
// This flag is used to decide if users can dynamically configure cloud settings. It turns true when a .env file exists containing the APPFLOWY_CLOUD_URL variable. By default, this is set to false.
2023-11-28 02:54:31 +00:00
static bool get enableCustomCloud {
2024-01-12 06:34:59 +00:00
return Env . authenticatorType = =
AuthenticatorType . appflowyCloudSelfHost . value | |
2024-01-15 04:53:53 +00:00
Env . authenticatorType = = AuthenticatorType . appflowyCloud . value | |
Env . authenticatorType = = AuthenticatorType . appflowyCloudDevelop . value & &
2024-01-12 06:34:59 +00:00
_Env . afCloudUrl . isEmpty ;
2023-11-28 02:54:31 +00:00
}
@ EnviedField (
obfuscate: false ,
varName: ' AUTHENTICATOR_TYPE ' ,
defaultValue: 2 ,
)
static const int authenticatorType = _Env . authenticatorType ;
/// AppFlowy Cloud Configuration
@ EnviedField (
obfuscate: false ,
varName: ' APPFLOWY_CLOUD_URL ' ,
defaultValue: ' ' ,
)
static const String afCloudUrl = _Env . afCloudUrl ;
2024-07-10 05:55:40 +00:00
@ EnviedField (
obfuscate: false ,
varName: ' INTERNAL_BUILD ' ,
defaultValue: ' ' ,
)
static const String internalBuild = _Env . internalBuild ;
2024-08-15 02:00:27 +00:00
@ EnviedField (
obfuscate: false ,
varName: ' SENTRY_DSN ' ,
defaultValue: ' ' ,
)
static const String sentryDsn = _Env . sentryDsn ;
2023-11-28 02:54:31 +00:00
}