happy ending

This commit is contained in:
baroni31
2026-05-20 22:08:30 +01:00
parent 3b93cffd38
commit 20f3c821ca
24 changed files with 60 additions and 56 deletions

View File

@@ -3,17 +3,16 @@ import 'package:supabase_flutter/supabase_flutter.dart';
class SupabaseConfig {
const SupabaseConfig._();
static const _url = String.fromEnvironment('SUPABASE_URL');
static const _anonKey = String.fromEnvironment('SUPABASE_ANON_KEY');
static const _url = String.fromEnvironment(
'SUPABASE_URL',
defaultValue: 'https://vnpqjabecckhtceggtgx.supabase.co',
);
static const _anonKey = String.fromEnvironment(
'SUPABASE_ANON_KEY',
defaultValue: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZucHFqYWJlY2NraHRjZWdndGd4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkzMDM5MTAsImV4cCI6MjA5NDg3OTkxMH0.pcHmcLNQrc3cvZPYZ8eu-A7Me_HZt9I2Brwo-k6w35A',
);
static Future<void> initialize() async {
if (_url.isEmpty || _anonKey.isEmpty) {
throw StateError(
'Missing Supabase env values. Provide SUPABASE_URL and SUPABASE_ANON_KEY '
'using --dart-define.',
);
}
await Supabase.initialize(
url: _url,
anonKey: _anonKey,