chore: Update and install project dependencies.
This commit is contained in:
@@ -13,11 +13,12 @@ class SupabaseConfig {
|
||||
/// - iOS 模拟器/macOS: 使用 localhost
|
||||
/// - 真机测试: 需要替换为电脑的局域网 IP 地址
|
||||
static String get url {
|
||||
// Android 模拟器需要使用 10.0.2.2 来访问主机
|
||||
if (Platform.isAndroid) {
|
||||
return 'http://10.0.2.2:8000';
|
||||
// 真机测试: Android 和 iOS 都使用电脑的局域网 IP 地址
|
||||
// 模拟器测试: Android 用 10.0.2.2,iOS 用 localhost
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
return 'http://192.168.3.118:8000';
|
||||
}
|
||||
// 其他平台使用 localhost
|
||||
// macOS 使用 localhost
|
||||
return 'http://localhost:8000';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user