How to Change Server URL
If you need to update the server URL in your Flutter app, follow these steps to ensure proper connectivity.
🔑 Step 1: Get the API Base URL
-
Open your Admin Panel.
-
Navigate to:
Settings -> API Key Settings
-
Copy the API link for your app.
note
Ensure you copy the correct base URL.
📝 Step 2: Update the URL in Your App
-
Navigate to the following file:
lib/helper/constant.dart
-
Locate the
baseURL
variable and update it with the new API URL.const String baseURL = "https://your-server.com/api/";
note
⚠️ Don't forget: Add a slash (/
) after api
to avoid errors.
⚡ Step 3: Apply Changes
- Save the file.
- Restart the app to apply the new settings.
✅ Your server URL is now updated! 🚀🌍