diff --git a/lib/services/api.dart b/lib/services/api.dart index 7688558..3222561 100644 --- a/lib/services/api.dart +++ b/lib/services/api.dart @@ -132,12 +132,17 @@ class Api { // no-op } + // ============================================= + // ENVIRONMENT SWITCH + // ============================================= + // Set to TRUE for testing (dev.payfrit.com) + // Set to FALSE before building for App Store / Play Store + static const bool isDev = true; + static String get baseUrl { - const v = String.fromEnvironment("PAYFRIT_API_BASE_URL"); - if (v.isEmpty) { - return "https://biz.payfrit.com/api"; - } - return v; + return isDev + ? "https://dev.payfrit.com/api" + : "https://biz.payfrit.com/api"; } static Uri _u(String path) {