AppFlowy/frontend/appflowy_flutter/lib/env/env.dart
Mathias Mogensen cdfb634aa6
chore: upgrade flutter to 3.10.1 (#2619)
* 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
2023-05-28 12:09:39 +08:00

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;