init cc
This commit is contained in:
35
lib/core/constants/app_constants.dart
Normal file
35
lib/core/constants/app_constants.dart
Normal 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';
|
||||
}
|
||||
3
lib/core/constants/constants.dart
Normal file
3
lib/core/constants/constants.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
// Barrel export file for constants
|
||||
export 'app_constants.dart';
|
||||
export 'storage_constants.dart';
|
||||
24
lib/core/constants/storage_constants.dart
Normal file
24
lib/core/constants/storage_constants.dart
Normal 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';
|
||||
}
|
||||
Reference in New Issue
Block a user