@marcos_feitoza/personal-finance-frontend-feature-management 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.1](https://github.com/MarcosOps/personal-finance-frontend-feature-management/compare/v1.0.0...v1.0.1) (2025-12-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * conversão double.parse ([5a88347](https://github.com/MarcosOps/personal-finance-frontend-feature-management/commit/5a8834708acb549d3e57ade9f8ad2e74a4a2cd5b))
7
+
1
8
  # 1.0.0 (2025-11-28)
2
9
 
3
10
 
@@ -32,9 +32,10 @@ class _ReconciliationScreenState extends State<ReconciliationScreen> {
32
32
  @override
33
33
  void initState() {
34
34
  super.initState();
35
- _selectedPaymentMethod =
36
- widget.paymentMethod.isNotEmpty ? widget.paymentMethod.toUpperCase() : null;
37
-
35
+ _selectedPaymentMethod = widget.paymentMethod.isNotEmpty
36
+ ? widget.paymentMethod.toUpperCase()
37
+ : null;
38
+
38
39
  // Get token from AuthProvider
39
40
  WidgetsBinding.instance.addPostFrameCallback((_) {
40
41
  final authProvider = Provider.of<AuthProvider>(context, listen: false);
@@ -57,10 +58,13 @@ class _ReconciliationScreenState extends State<ReconciliationScreen> {
57
58
  setState(() {
58
59
  _isLoading = true;
59
60
  });
60
- final summary = await _transactionService.getSummaryByPaymentMethod(token: _token);
61
+ final summary =
62
+ await _transactionService.getSummaryByPaymentMethod(token: _token);
61
63
  setState(() {
62
- _availablePaymentMethods = summary.map((s) => s['payment_method'] as String).toList();
63
- if (_selectedPaymentMethod != null && !_availablePaymentMethods.contains(_selectedPaymentMethod)) {
64
+ _availablePaymentMethods =
65
+ summary.map((s) => s['payment_method'] as String).toList();
66
+ if (_selectedPaymentMethod != null &&
67
+ !_availablePaymentMethods.contains(_selectedPaymentMethod)) {
64
68
  _selectedPaymentMethod = null; // Clear selection if not in the new list
65
69
  }
66
70
  _isLoading = false;
@@ -107,7 +111,8 @@ class _ReconciliationScreenState extends State<ReconciliationScreen> {
107
111
  _selectedTotal = 0;
108
112
  for (int id in _selectedIds) {
109
113
  final transaction = _unpaidTransactions.firstWhere((t) => t['id'] == id);
110
- final double amount = double.parse(transaction['amount'].toString());
114
+ final double amount =
115
+ double.tryParse(transaction['amount']?.toString() ?? '0.0') ?? 0.0;
111
116
  final String type = transaction['type'];
112
117
  _selectedTotal += type == 'debit' ? amount : -amount;
113
118
  }
@@ -191,7 +196,10 @@ class _ReconciliationScreenState extends State<ReconciliationScreen> {
191
196
  ],
192
197
  rows: _unpaidTransactions.map((transaction) {
193
198
  final transactionId = transaction['id'] as int;
194
- final amount = double.parse(transaction['amount'].toString());
199
+ final double amount = double.tryParse(
200
+ transaction['amount']?.toString() ??
201
+ '0.0') ??
202
+ 0.0;
195
203
  return DataRow(
196
204
  cells: [
197
205
  DataCell(Checkbox(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcos_feitoza/personal-finance-frontend-feature-management",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },