style(app): остальные экраны под новый визуальный язык и форматирование
Доходы, ребалансировка, налоги, импорт, цели, здоровье данных, правила, транзакции, категории, cashflow, pending: новые виджеты и токены темы, dart format. Тесты подстроены под новые модели.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../core/widgets/help_tip.dart';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../core/widgets/async_value_view.dart';
|
||||
@@ -30,7 +33,10 @@ class TaxSummaryTab extends ConsumerWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text('${data.year} год', style: Theme.of(context).textTheme.titleLarge),
|
||||
Text(
|
||||
'${data.year} год',
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
if (data.estimated)
|
||||
const Chip(
|
||||
@@ -40,7 +46,9 @@ class TaxSummaryTab extends ConsumerWidget {
|
||||
),
|
||||
const Spacer(),
|
||||
if (data.taxRate != null)
|
||||
Text('ставка ${formatPercent(data.taxRate, signed: false)}'),
|
||||
Text(
|
||||
'ставка ${formatPercent(data.taxRate, signed: false)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
@@ -124,15 +132,72 @@ class _AccountsTable extends StatelessWidget {
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: DataTable(
|
||||
columns: [
|
||||
DataColumn(label: Text('Счёт', style: headerStyle)),
|
||||
DataColumn(label: Text('Дивиденды', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('Купоны', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('Удержано', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('Прибыль', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('Убыток', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('ЛДВ', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('База', style: headerStyle), numeric: true),
|
||||
DataColumn(label: Text('Налог (оценка)', style: headerStyle), numeric: true),
|
||||
DataColumn(label: TermLabel('Счёт', style: headerStyle)),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'Дивиденды',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'Купоны',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'Удержано',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'Прибыль',
|
||||
hint: 'Сумма положительных результатов по проданным бумагам за год (до вычета убытков).',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'Убыток',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'ЛДВ',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'База',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
DataColumn(
|
||||
label: TermLabel(
|
||||
'Налог (оценка)',
|
||||
style: headerStyle,
|
||||
alignment: MainAxisAlignment.end,
|
||||
),
|
||||
numeric: true,
|
||||
),
|
||||
],
|
||||
rows: [
|
||||
for (final r in rows) _row(context, r, bold: false),
|
||||
@@ -149,7 +214,11 @@ class _AccountsTable extends StatelessWidget {
|
||||
: MoneyText(
|
||||
v,
|
||||
currency: 'RUB',
|
||||
style: signed ? (style ?? const TextStyle()).copyWith(color: signColor(context, v)) : style,
|
||||
style: signed
|
||||
? (style ?? const TextStyle()).copyWith(
|
||||
color: signColor(context, v),
|
||||
)
|
||||
: style,
|
||||
);
|
||||
|
||||
return DataRow(
|
||||
|
||||
Reference in New Issue
Block a user