login added

This commit is contained in:
amirrezaghabeli
2025-08-16 16:11:57 +03:30
parent 8279702fad
commit 81d01d53ae
16 changed files with 1237 additions and 309 deletions
+20 -5
View File
@@ -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';
// }
}
// کلیدهای حساس را به این شکل مدیریت کنید