Add isDev environment switch for dev/prod API

This commit is contained in:
John Mizerek 2026-01-26 22:57:15 -08:00
parent 3e68a3282b
commit 55da667a73

View file

@ -132,12 +132,17 @@ class Api {
// no-op // 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 { static String get baseUrl {
const v = String.fromEnvironment("PAYFRIT_API_BASE_URL"); return isDev
if (v.isEmpty) { ? "https://dev.payfrit.com/api"
return "https://biz.payfrit.com/api"; : "https://biz.payfrit.com/api";
}
return v;
} }
static Uri _u(String path) { static Uri _u(String path) {