happy ending
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user