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';
|
||||
}
|
||||
Reference in New Issue
Block a user