This commit is contained in:
2025-09-26 18:48:14 +07:00
parent 382a0e7909
commit 30ed6b39b5
85 changed files with 20722 additions and 112 deletions

View File

@@ -0,0 +1,35 @@
/// Application-wide constants
class AppConstants {
// App Information
static const String appName = 'Base Flutter';
static const String appVersion = '1.0.0';
// API Configuration
static const Duration connectionTimeout = Duration(seconds: 30);
static const Duration receiveTimeout = Duration(seconds: 30);
static const Duration sendTimeout = Duration(seconds: 30);
// Pagination
static const int defaultPageSize = 20;
static const int maxPageSize = 100;
// Cache Configuration
static const Duration cacheExpiration = Duration(hours: 1);
static const int maxCacheSize = 50 * 1024 * 1024; // 50MB
// Animation Durations
static const Duration shortAnimation = Duration(milliseconds: 200);
static const Duration mediumAnimation = Duration(milliseconds: 300);
static const Duration longAnimation = Duration(milliseconds: 500);
// UI Constants
static const double defaultPadding = 16.0;
static const double smallPadding = 8.0;
static const double largePadding = 24.0;
static const double defaultRadius = 8.0;
// Error Messages
static const String networkErrorMessage = 'Network connection error';
static const String unknownErrorMessage = 'An unknown error occurred';
static const String timeoutErrorMessage = 'Request timeout';
}

View File

@@ -0,0 +1,3 @@
// Barrel export file for constants
export 'app_constants.dart';
export 'storage_constants.dart';

View File

@@ -0,0 +1,24 @@
/// Storage-related constants for Hive boxes and secure storage keys
class StorageConstants {
// Hive Box Names
static const String appSettingsBox = 'app_settings';
static const String userDataBox = 'user_data';
static const String cacheBox = 'cache_box';
// Secure Storage Keys
static const String authTokenKey = 'auth_token';
static const String refreshTokenKey = 'refresh_token';
static const String userCredentialsKey = 'user_credentials';
static const String biometricKey = 'biometric_enabled';
// Cache Keys
static const String userPreferencesKey = 'user_preferences';
static const String appThemeKey = 'app_theme';
static const String languageKey = 'selected_language';
static const String firstRunKey = 'is_first_run';
// Settings Keys
static const String isDarkModeKey = 'is_dark_mode';
static const String notificationsEnabledKey = 'notifications_enabled';
static const String autoSyncKey = 'auto_sync_enabled';
}