const defaultBaseUrl = 'https://kickkings.playpoolstudios.com'; const supportCategoryLabels = { 'bug': 'Report Bug', 'cheating': 'Report cheating', 'withdrawal': 'Request withdrawal', 'crypto': 'Pay with crypto', 'other': 'Other', }; const _rawBaseUrl = String.fromEnvironment( 'BASE_URL', defaultValue: defaultBaseUrl, ); /// Admin server origin with no trailing slash. final String baseUrl = normalizeBaseUrl(_rawBaseUrl); String normalizeBaseUrl(String value) { var url = value.trim(); while (url.endsWith('/')) { url = url.substring(0, url.length - 1); } return url; } Map ticketListQuery({String? status, String? category}) { return { if (status != null && status.isNotEmpty) 'status': status, if (category != null && category.isNotEmpty) 'category': category, }; }