add auth, format
This commit is contained in:
@@ -398,7 +398,10 @@ class ApiConstants {
|
||||
/// final url = ApiConstants.buildUrlWithParams('/products/{id}', {'id': '123'});
|
||||
/// // Returns: https://api.worker.example.com/v1/products/123
|
||||
/// ```
|
||||
static String buildUrlWithParams(String endpoint, Map<String, String> params) {
|
||||
static String buildUrlWithParams(
|
||||
String endpoint,
|
||||
Map<String, String> params,
|
||||
) {
|
||||
String url = endpoint;
|
||||
params.forEach((key, value) {
|
||||
url = url.replaceAll('{$key}', value);
|
||||
|
||||
@@ -440,7 +440,12 @@ class AppConstants {
|
||||
static const int maxProductImageSize = 3;
|
||||
|
||||
/// Supported image formats
|
||||
static const List<String> supportedImageFormats = ['jpg', 'jpeg', 'png', 'webp'];
|
||||
static const List<String> supportedImageFormats = [
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'png',
|
||||
'webp',
|
||||
];
|
||||
|
||||
/// Image quality for compression (0-100)
|
||||
static const int imageQuality = 85;
|
||||
|
||||
@@ -59,22 +59,22 @@ class HiveBoxNames {
|
||||
|
||||
/// Get all box names for initialization
|
||||
static List<String> get allBoxes => [
|
||||
userBox,
|
||||
productBox,
|
||||
cartBox,
|
||||
orderBox,
|
||||
projectBox,
|
||||
quotes,
|
||||
loyaltyBox,
|
||||
rewardsBox,
|
||||
settingsBox,
|
||||
cacheBox,
|
||||
syncStateBox,
|
||||
notificationBox,
|
||||
addressBox,
|
||||
favoriteBox,
|
||||
offlineQueueBox,
|
||||
];
|
||||
userBox,
|
||||
productBox,
|
||||
cartBox,
|
||||
orderBox,
|
||||
projectBox,
|
||||
quotes,
|
||||
loyaltyBox,
|
||||
rewardsBox,
|
||||
settingsBox,
|
||||
cacheBox,
|
||||
syncStateBox,
|
||||
notificationBox,
|
||||
addressBox,
|
||||
favoriteBox,
|
||||
offlineQueueBox,
|
||||
];
|
||||
}
|
||||
|
||||
/// Hive Type Adapter IDs
|
||||
@@ -152,7 +152,8 @@ class HiveTypeIds {
|
||||
// Aliases for backward compatibility and clarity
|
||||
static const int memberTier = loyaltyTier; // Alias for loyaltyTier
|
||||
static const int userType = userRole; // Alias for userRole
|
||||
static const int projectStatus = submissionStatus; // Alias for submissionStatus
|
||||
static const int projectStatus =
|
||||
submissionStatus; // Alias for submissionStatus
|
||||
static const int transactionType = entryType; // Alias for entryType
|
||||
|
||||
// Cache & Sync Models (60-69)
|
||||
|
||||
Reference in New Issue
Block a user