This commit is contained in:
2026-03-20 16:28:26 +03:00
parent 0625e79e73
commit 250bd94812
5 changed files with 117 additions and 38 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import 'package:path_provider/path_provider.dart';
import 'package:intl/intl.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../shared/services/exchange_rate_service.dart';
import '../../shared/utils/currency_utils.dart';
import '../dashboard/provider.dart';
final budgetProvider = StateNotifierProvider<BudgetNotifier, double?>((ref) {
@@ -124,7 +125,7 @@ class ExportService {
final date = DateFormat('yyyy-MM-dd').format(tx.date);
final type = tx.type.name;
final category = tx.category;
final amount = '${tx.currency}${tx.amount.toStringAsFixed(2)}';
final amount = formatAmount(tx.currency, tx.amount);
final note = tx.note?.replaceAll(',', ';') ?? '';
buffer.writeln('$date,$type,$category,$amount,${tx.currencyCode},$note');
}
+5 -2
View File
@@ -4,6 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import '../../core/constants.dart';
import '../../shared/utils/currency_utils.dart';
import 'provider.dart';
class SettingsScreen extends ConsumerStatefulWidget {
@@ -196,7 +197,9 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
FilteringTextInputFormatter.allow(RegExp(r'^\d+\.?\d{0,2}')),
],
decoration: InputDecoration(
prefixText: '${currencyInfo.symbol} ',
prefixText: currencyInfo.symbol == 'Br' || currencyInfo.symbol == ''
? '${currencyInfo.symbol} '
: currencyInfo.symbol,
hintText: '0.00',
helperText: 'Leave empty to remove budget limit',
),
@@ -232,7 +235,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
children: [
Text(
budget != null
? _currencyFmt.format(budget)
? formatAmount(currencyInfo.symbol, budget)
: 'Not set',
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
color: budget != null ? AppColors.accent : Theme.of(context).colorScheme.onSurface.withOpacity(0.6),