init
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
const defaultBaseUrl = 'https://kickkings.playpoolstudios.com';
|
||||
|
||||
const supportCategoryLabels = <String, String>{
|
||||
'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<String, String> ticketListQuery({String? status, String? category}) {
|
||||
return {
|
||||
if (status != null && status.isNotEmpty) 'status': status,
|
||||
if (category != null && category.isNotEmpty) 'category': category,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user