This commit is contained in:
2026-06-15 16:42:28 +03:30
commit 068930c7bd
158 changed files with 5330 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
/// تنظیمات سراسری اپ.
class AppConfig {
/// آدرس پایه‌ی سرور.
/// - موبایل واقعی روی همان Wi-Fi: IP محلی مک (پیش‌فرض فعلی).
/// - امولاتور اندروید: `--dart-define=BASE_URL=http://10.0.2.2:8080`
/// - وب / شبیه‌ساز iOS: `--dart-define=BASE_URL=http://localhost:8080`
/// - پروداکشن: `--dart-define=BASE_URL=https://api.hakemsho.ir`
/// با تغییر شبکه/IP مک، مقدار dart-define یا همین پیش‌فرض را عوض کنید.
static const String baseUrl =
String.fromEnvironment('BASE_URL', defaultValue: 'http://192.168.100.28:8080');
static String get apiUrl => '$baseUrl/api';
/// آدرس WebSocket بازی به‌همراه توکن احراز هویت.
static String wsUrl(String token) =>
'${baseUrl.replaceFirst('http', 'ws')}/ws?token=$token';
}