Files
BudgetApp/lib/theme/custom_colors.dart
T
Sanders 42f8e20bf0 Improves: Internationalization and data models
- Adds new localization keys for transaction details.
- Deletes obsolete localization files, switching to a single ARB file per language.
- Adds `Equatable` to data models (`Category`, `Tag`, `TransactionRecord`, `User`) for improved state management and change detection.
- Introduces the transaction creation dialog.
- Adds development note to GEMINI.md

Improves internationalization and data models

- Adds new localization keys for transaction details, supporting enhanced user experience.
- Migrates to single ARB file for each language, streamlining the localization process.
- Implements Equatable in data models (Category, Tag, TransactionRecord, User) for improved state management and simplified change detection.
- Introduces transaction creation dialog, simplifying the transaction creation process.
- Adds development note to GEMINI.md
2025-06-29 23:03:17 +03:00

34 lines
818 B
Dart

import 'package:flutter/material.dart';
// Расширение темы для добавления пользовательских цветов.
@immutable
class CustomColors extends ThemeExtension<CustomColors> {
const CustomColors({
required this.income,
required this.expense,
});
final Color? income;
final Color? expense;
@override
CustomColors copyWith({Color? income, Color? expense}) {
return CustomColors(
income: income ?? this.income,
expense: expense ?? this.expense,
);
}
@override
CustomColors lerp(ThemeExtension<CustomColors>? other, double t) {
if (other is! CustomColors) {
return this;
}
return CustomColors(
income: Color.lerp(income, other.income, t),
expense: Color.lerp(expense, other.expense, t),
);
}
}