Commit 56506d32 authored by gustixjerk's avatar gustixjerk

feat: repoint mobile API to https://imi.khansia.co.id/api/v1

parent 30d2144f
import 'dart:io' show Platform;
import 'package:flutter/foundation.dart';
class AppConstants {
static const String appName = 'IMI Jawa Barat';
static const String appVersion = '1.0.0';
// Public Ngrok URL for testing on physical mobile devices
static const String ngrokBaseUrl = 'https://wilt-process-demanding.ngrok-free.dev/api/v1';
// Production domain & API configuration
static const String productionBaseUrl = 'https://imi.khansia.co.id/api/v1';
// Base API configuration
static String get defaultBaseUrl {
if (kIsWeb) {
return 'http://127.0.0.1:8000/api/v1';
}
// Default to public ngrok tunnel for physical mobile devices
return ngrokBaseUrl;
// Default to official production server imi.khansia.co.id for APK & Web
return productionBaseUrl;
}
// Storage keys
......
......@@ -102,12 +102,12 @@ class _LoginScreenState extends State<LoginScreen> {
TextField(
controller: controller,
decoration: const InputDecoration(
hintText: 'http://127.0.0.1:8000/api/v1',
hintText: 'https://imi.khansia.co.id/api/v1',
),
),
const SizedBox(height: 10),
Text(
'Browser Web: http://127.0.0.1:8000/api/v1\nNgrok / HP: ${AppConstants.ngrokBaseUrl}',
'Default Server: ${AppConstants.productionBaseUrl}\nLokal Server: http://127.0.0.1:8000/api/v1',
style: const TextStyle(fontSize: 11, color: AppColors.textMuted),
),
],
......
......@@ -70,12 +70,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
TextField(
controller: controller,
decoration: const InputDecoration(
hintText: 'http://10.0.2.2:8000/api/v1',
hintText: 'https://imi.khansia.co.id/api/v1',
),
),
const SizedBox(height: 10),
const Text(
'Emulator Android gunakan: http://10.0.2.2:8000/api/v1\nHP Fisik gunakan IP LAN komputer: http://192.168.x.x:8000/api/v1',
'Default Server: https://imi.khansia.co.id/api/v1\nLokal Server: http://10.0.2.2:8000/api/v1',
style: TextStyle(fontSize: 11, color: AppColors.textMuted),
),
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment