feat: 角色卡 demo
This commit is contained in:
31
wei_ai_app/lib/core/config/supabase_config.dart
Normal file
31
wei_ai_app/lib/core/config/supabase_config.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'dart:io';
|
||||
|
||||
/// Supabase 配置
|
||||
///
|
||||
/// 这里配置了本地 Docker 部署的 Supabase 连接信息
|
||||
/// 生产环境部署时需要替换为实际的 URL 和 Key
|
||||
class SupabaseConfig {
|
||||
SupabaseConfig._();
|
||||
|
||||
/// Supabase API URL
|
||||
///
|
||||
/// - Android 模拟器: 使用 10.0.2.2 访问主机
|
||||
/// - iOS 模拟器/macOS: 使用 localhost
|
||||
/// - 真机测试: 需要替换为电脑的局域网 IP 地址
|
||||
static String get url {
|
||||
// Android 模拟器需要使用 10.0.2.2 来访问主机
|
||||
if (Platform.isAndroid) {
|
||||
return 'http://10.0.2.2:8000';
|
||||
}
|
||||
// 其他平台使用 localhost
|
||||
return 'http://localhost:8000';
|
||||
}
|
||||
|
||||
/// Supabase Anon Key
|
||||
/// 这个 key 是公开的,用于客户端访问
|
||||
static const String anonKey =
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzY5NTk1NjI4LCJleHAiOjE5MjcyNzU2Mjh9.moV0JpCSx3Y1QTZmKZ5K-tQLaWcshxtxFlCoIBQFsEU';
|
||||
|
||||
/// 是否启用调试模式
|
||||
static const bool debug = true;
|
||||
}
|
||||
Reference in New Issue
Block a user