mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
3e17613f54
* chore: save cloud ofnig * chore: fix .a link warnings * chore: add cloud test runner * refactor: test folder * ci: add test * ci: add test * ci: fix * ci: fix
29 lines
670 B
Dart
29 lines
670 B
Dart
// 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 {
|
|
static bool get enableCustomCloud {
|
|
return Env.authenticatorType == AuthenticatorType.appflowyCloud.value &&
|
|
_Env.afCloudUrl.isEmpty;
|
|
}
|
|
|
|
@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;
|
|
}
|