This commit is contained in:
2026-03-20 14:52:24 +03:00
parent 76cd02c766
commit 7ff6f6b227
3 changed files with 22 additions and 41 deletions
+8 -6
View File
@@ -104,6 +104,7 @@ class _AddTransactionScreenState extends ConsumerState<AddTransactionScreen> {
final state = ref.watch(addTransactionProvider(widget.initial));
final categories = ref.watch(availableCategoriesProvider(widget.initial));
final currencyInfo = ref.watch(currencyProvider);
final isDark = Theme.of(context).brightness == Brightness.dark;
return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@@ -245,7 +246,7 @@ class _AddTransactionScreenState extends ConsumerState<AddTransactionScreen> {
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Theme.of(context).dividerColor),
border: isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1),
),
child: Row(
children: [
@@ -323,11 +324,12 @@ class _TypeToggle extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isDark = Theme.of(context).brightness == Brightness.dark;
return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(14),
border: Border.all(color: Theme.of(context).dividerColor),
border: isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1),
),
child: Row(
children: [
@@ -409,6 +411,7 @@ class _CategoryPicker extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isDark = Theme.of(context).brightness == Brightness.dark;
return Wrap(
spacing: 8,
runSpacing: 8,
@@ -424,10 +427,9 @@ class _CategoryPicker extends StatelessWidget {
decoration: BoxDecoration(
color: isSelected ? color.withOpacity(0.2) : Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: isSelected ? color : Theme.of(context).dividerColor,
width: isSelected ? 1.5 : 1,
),
border: isSelected
? Border.all(color: color, width: 1.5)
: (isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
+7 -5
View File
@@ -38,6 +38,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
final recent = ref.watch(recentTransactionsProvider);
final filter = ref.watch(transactionFilterProvider);
final currencyInfo = ref.watch(currencyProvider);
final isDark = Theme.of(context).brightness == Brightness.dark;
final budgetExceeded = budget != null && monthExpense > budget;
@@ -218,6 +219,7 @@ class _FilterChip extends StatelessWidget {
@override
Widget build(BuildContext context) {
final chipColor = color ?? AppColors.accent;
final isDark = Theme.of(context).brightness == Brightness.dark;
return GestureDetector(
onTap: onTap,
child: AnimatedContainer(
@@ -226,10 +228,9 @@ class _FilterChip extends StatelessWidget {
decoration: BoxDecoration(
color: isSelected ? chipColor.withOpacity(0.2) : Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: isSelected ? chipColor : Theme.of(context).dividerColor,
width: isSelected ? 1.5 : 1,
),
border: isSelected
? Border.all(color: chipColor, width: 1.5)
: (isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1)),
),
child: Text(
label,
@@ -334,12 +335,13 @@ class _BudgetWarning extends StatelessWidget {
@override
Widget build(BuildContext context) {
final over = spent - budget;
final isDark = Theme.of(context).brightness == Brightness.dark;
return Container(
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
color: AppColors.expense.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: AppColors.expense.withOpacity(0.3)),
border: isDark ? null : Border.all(color: AppColors.expense.withOpacity(0.3), width: 1),
),
child: Row(
children: [
+7 -30
View File
@@ -54,6 +54,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
final themeMode = ref.watch(themeProvider);
final isDarkMode = themeMode == ThemeMode.dark;
final currencyInfo = ref.watch(currencyProvider);
final isDark = Theme.of(context).brightness == Brightness.dark;
// Update currency format when it changes
_currencyFmt = NumberFormat.currency(symbol: currencyInfo.symbol, decimalDigits: 2);
@@ -100,7 +101,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: Theme.of(context).dividerColor),
border: isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1),
),
child: Row(
children: [
@@ -155,7 +156,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: Theme.of(context).dividerColor),
border: isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -208,10 +209,9 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
? AppColors.accent.withOpacity(0.2)
: Theme.of(context).scaffoldBackgroundColor,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: isSelected ? AppColors.accent : Theme.of(context).dividerColor,
width: isSelected ? 1.5 : 1,
),
border: isSelected
? Border.all(color: AppColors.accent, width: 1.5)
: (isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1)),
),
child: Column(
children: [
@@ -249,7 +249,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: Theme.of(context).dividerColor),
border: isDark ? null : Border.all(color: const Color(0xFFDDDDEE), width: 1),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -355,29 +355,6 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
],
),
),
const SizedBox(height: 24),
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: AppColors.accent.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: AppColors.accent.withOpacity(0.3)),
),
child: Row(
children: [
const Icon(Icons.info_outline_rounded, color: AppColors.accent, size: 20),
const SizedBox(width: 12),
Expanded(
child: Text(
'Budget tracking shows on the Dashboard with a progress bar and warning when exceeded.',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
),
],
),
),
],
),
),