2023-11-27 18:54:31 -08: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 13:47:12 -08: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-27 18:54:31 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  static  bool  get  enableCustomCloud  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:34:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    return  Env . authenticatorType  = = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            AuthenticatorType . appflowyCloudSelfHost . value  | | 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-15 12:53:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        Env . authenticatorType  = =  AuthenticatorType . appflowyCloud . value  | | 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        Env . authenticatorType  = =  AuthenticatorType . appflowyCloudDevelop . value  & & 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:34:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            _Env . afCloudUrl . isEmpty ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 18:54:31 -08: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 13:55:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  @ EnviedField ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    obfuscate:  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    varName:  ' INTERNAL_BUILD ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    defaultValue:  ' ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  static  const  String  internalBuild  =  _Env . internalBuild ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-15 10:00:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  @ EnviedField ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    obfuscate:  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    varName:  ' SENTRY_DSN ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    defaultValue:  ' ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  static  const  String  sentryDsn  =  _Env . sentryDsn ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 18:54:31 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}