Riverpod + go_router с auth-guard, NavigationRail на широком экране и bottom bar на узком. Токены в flutter_secure_storage, на web access живёт в памяти. Интерцептор подставляет токен и делает ровно один refresh на 401. Деньги приходят строками и форматируются через Decimal: парсить их в double значило бы терять копейки ровно там, где бэкенд их бережёт.
11 lines
420 B
Dart
11 lines
420 B
Dart
import 'package:fintracker_app/core/widgets/money_text.dart';
|
||
import 'package:flutter_test/flutter_test.dart';
|
||
|
||
void main() {
|
||
test('formats a decimal-string RUB amount with ru_RU grouping', () {
|
||
// intl's ru_RU locale data uses U+00A0 (NBSP) as both the group and
|
||
// currency separator, so the expected string is not plain ASCII spaces.
|
||
expect(MoneyText.format('1234.5', 'RUB'), '1 234,50 ₽');
|
||
});
|
||
}
|