mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
cdfb634aa6
* chore: upgrade flutter and dart * ci: upgrade flutter in cicd * fix: remove textstyle_extensions from flowy_infra * ci: upgrade flutter in cicd * fix: update flutter.toml * fix: deprecations and ffi * fix: move json_annotation to dependencies Must have accidentally moved it to dev_dependencies when upgrading dependencies * fix: update editor ref and use fold * chore: try with generate true
46 lines
1.1 KiB
Dart
46 lines
1.1 KiB
Dart
// lib/env/env.dart
|
|
import 'package:envied/envied.dart';
|
|
|
|
part 'env.g.dart';
|
|
|
|
@Envied(path: '.env')
|
|
abstract class Env {
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_URL',
|
|
defaultValue: '',
|
|
)
|
|
static final String supabaseUrl = _Env.supabaseUrl;
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_ANON_KEY',
|
|
defaultValue: '',
|
|
)
|
|
static final String supabaseAnonKey = _Env.supabaseAnonKey;
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_KEY',
|
|
defaultValue: '',
|
|
)
|
|
static final String supabaseKey = _Env.supabaseKey;
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_JWT_SECRET',
|
|
defaultValue: '',
|
|
)
|
|
static final String supabaseJwtSecret = _Env.supabaseJwtSecret;
|
|
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_COLLAB_TABLE',
|
|
defaultValue: '',
|
|
)
|
|
static final String supabaseCollabTable = _Env.supabaseCollabTable;
|
|
}
|
|
|
|
bool get isSupabaseEnable =>
|
|
Env.supabaseUrl.isNotEmpty &&
|
|
Env.supabaseAnonKey.isNotEmpty &&
|
|
Env.supabaseKey.isNotEmpty &&
|
|
Env.supabaseJwtSecret.isNotEmpty;
|