login added
This commit is contained in:
@@ -8,11 +8,26 @@ class AppConfig {
|
||||
|
||||
// این متد بر اساس محیط فعال، URL مناسب را برمیگرداند.
|
||||
static String get apiBaseUrl {
|
||||
if (isDevelopment) {
|
||||
return 'https://api.dev.your-app.com';
|
||||
} else {
|
||||
return 'https://api.prod.your-app.com';
|
||||
}
|
||||
return 'http://10.0.2.2:8081';
|
||||
// if (isDevelopment) {
|
||||
// // Handle different platforms for local development
|
||||
// if (kIsWeb) {
|
||||
// // For web, use localhost
|
||||
// return 'http://localhost:8081';
|
||||
// } else if (Platform.isAndroid) {
|
||||
// // For Android emulator, use 10.0.2.2 (special IP for host machine)
|
||||
// return 'http://10.0.2.2:8081';
|
||||
// } else if (Platform.isIOS) {
|
||||
// // For iOS simulator, use localhost
|
||||
// return 'http://localhost:8081';
|
||||
// } else {
|
||||
// // For other platforms (desktop), use localhost
|
||||
// return 'http://localhost:8081';
|
||||
// }
|
||||
// } else {
|
||||
// // Production URL - replace with your actual production server
|
||||
// return 'https://your-production-server.com';
|
||||
// }
|
||||
}
|
||||
|
||||
// کلیدهای حساس را به این شکل مدیریت کنید
|
||||
|
||||
Reference in New Issue
Block a user