mirror of
https://github.com/koloideal/Casha.git
synced 2026-06-10 18:35:28 +03:00
106 lines
2.9 KiB
Dart
106 lines
2.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../shared/models/transaction.dart';
|
|
|
|
class AppColors {
|
|
static const background = Color(0xFF0F0F14);
|
|
static const surface = Color(0xFF1A1A24);
|
|
static const accent = Color(0xFF7C6DED);
|
|
static const income = Color(0xFF4CAF8C);
|
|
static const expense = Color(0xFFE05C6B);
|
|
static const textPrimary = Color(0xFFEEEEF5);
|
|
static const textSecondary = Color(0xFF8888A0);
|
|
static const divider = Color(0xFF2A2A38);
|
|
static const warning = Color(0xFFFFB74D);
|
|
|
|
// Light theme colors
|
|
static const lightBackground = Color(0xFFF5F5F7);
|
|
static const lightSurface = Color(0xFFFFFFFF);
|
|
static const lightTextPrimary = Color(0xFF1A1A24);
|
|
static const lightTextSecondary = Color(0xFF6B6B80);
|
|
static const lightDivider = Color(0xFFE0E0E8);
|
|
}
|
|
|
|
class AppCategories {
|
|
static const expenseCategories = [
|
|
'Food',
|
|
'Transport',
|
|
'Shopping',
|
|
'Health',
|
|
'Entertainment',
|
|
'Other'
|
|
];
|
|
|
|
static const incomeCategories = [
|
|
'Salary',
|
|
'Freelance',
|
|
'Gift',
|
|
'Investment',
|
|
'Refund',
|
|
'Other'
|
|
];
|
|
|
|
static List<String> forType(TransactionType type) {
|
|
return type == TransactionType.expense
|
|
? expenseCategories
|
|
: incomeCategories;
|
|
}
|
|
|
|
static const icons = {
|
|
'Food': Icons.restaurant_rounded,
|
|
'Transport': Icons.directions_car_rounded,
|
|
'Shopping': Icons.shopping_bag_rounded,
|
|
'Health': Icons.favorite_rounded,
|
|
'Entertainment': Icons.movie_rounded,
|
|
'Salary': Icons.work_rounded,
|
|
'Freelance': Icons.laptop_rounded,
|
|
'Gift': Icons.card_giftcard_rounded,
|
|
'Investment': Icons.trending_up_rounded,
|
|
'Refund': Icons.money_rounded,
|
|
'Other': Icons.category_rounded,
|
|
};
|
|
|
|
static const colors = {
|
|
'Food': Color(0xFFFF8C69),
|
|
'Transport': Color(0xFF69B4FF),
|
|
'Shopping': Color(0xFFFFD369),
|
|
'Health': Color(0xFF69FFB4),
|
|
'Entertainment': Color(0xFFFF69B4),
|
|
'Salary': Color(0xFF4CAF8C),
|
|
'Freelance': Color(0xFF69FFB4),
|
|
'Gift': Color(0xFFFFB469),
|
|
'Investment': Color(0xFF69B4FF),
|
|
'Refund': Color(0xFFB4FF69),
|
|
'Other': Color(0xFFB469FF),
|
|
};
|
|
}
|
|
|
|
class CurrencyOption {
|
|
final String symbol;
|
|
final String name;
|
|
final String code;
|
|
|
|
const CurrencyOption({
|
|
required this.symbol,
|
|
required this.name,
|
|
required this.code,
|
|
});
|
|
}
|
|
|
|
class AppCurrencies {
|
|
static const options = [
|
|
CurrencyOption(symbol: '\$', name: 'US Dollar', code: 'USD'),
|
|
CurrencyOption(symbol: '€', name: 'Euro', code: 'EUR'),
|
|
CurrencyOption(symbol: '£', name: 'British Pound', code: 'GBP'),
|
|
CurrencyOption(symbol: 'Br', name: 'Belarusian Ruble', code: 'BYN'),
|
|
CurrencyOption(symbol: '₽', name: 'Russian Ruble', code: 'RUB'),
|
|
CurrencyOption(symbol: '₴', name: 'Ukrainian Hryvnia', code: 'UAH'),
|
|
];
|
|
|
|
static CurrencyOption findBySymbol(String symbol) {
|
|
return options.firstWhere(
|
|
(c) => c.symbol == symbol,
|
|
orElse: () => options.first,
|
|
);
|
|
}
|
|
}
|