Browser-Tab-Manager/lib/constants/app_constants.dart

67 lines
2.5 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
class AppConstants {
// App Theme
static const Color primaryColor = Color(0xFF0175C2);
// Extension Communication
static const String extensionSource = 'tab-tracker-extension';
static const String webappSource = 'tab-tracker-webapp';
// Default Values
static const int defaultHistoryLimit = 100;
static const Duration extensionCheckDelay = Duration(milliseconds: 500);
// Grid Configuration
static const double maxCrossAxisExtent = 300.0;
static const double childAspectRatio = 1.3;
static const double crossAxisSpacing = 16.0;
static const double mainAxisSpacing = 16.0;
// Padding and Spacing
static const EdgeInsets defaultPadding = EdgeInsets.all(16.0);
static const EdgeInsets cardPadding = EdgeInsets.all(12.0);
static const EdgeInsets buttonPadding = EdgeInsets.symmetric(horizontal: 8, vertical: 4);
// Icon Sizes
static const double smallIconSize = 14.0;
static const double mediumIconSize = 18.0;
static const double largeIconSize = 32.0;
static const double emptyStateIconSize = 80.0;
// Text Styles
static const double smallFontSize = 10.0;
static const double mediumFontSize = 20.0;
// Sort Options
static const List<String> sortOptions = ['recent', 'title', 'url', 'visits'];
static const List<String> filterOptions = ['all', 'tabs', 'bookmarks', 'history'];
// Messages
static const String trackingMessage = 'TRACKING';
static const String waitingMessage = 'Waiting for tabs...';
static const String noItemsMessage = 'No items found';
static const String openTabsHint = 'Open some tabs to see them here';
static const String tryDifferentSearchHint = 'Try a different search or filter';
// Search Hints
static const String extensionSearchHint = 'Search tracked tabs...';
static const String normalSearchHint = 'Search tabs, bookmarks, and history...';
}
// This is our centralized configuration file where all fixed values are stored in one place.
//
// It contains settings used throughout the app.
//
// Instead of hardcoding values
//
// This makes it easy to update the entire app by changing values in just one location.
//
// For example, changing primaryColor here updates every button, header, and highlight in the app.
//
// All user-facing messages are stored here making translation and text updates simple.
//
// Grid layout values are defined here so we can adjust the card view globally.
//
// This approach keeps our code clean, consistent, and easy to maintain.