mirror of
https://github.com/koloideal/Casha.git
synced 2026-06-10 10:25:28 +03:00
stableee
This commit is contained in:
@@ -3,6 +3,8 @@ import '../../core/constants.dart';
|
||||
String formatAmount(String symbol, double amount, AmountFormat fmt) {
|
||||
const spaceAfter = {'Br'};
|
||||
final formatted = fmt.format(amount);
|
||||
final sep = spaceAfter.contains(symbol) ? ' ' : '';
|
||||
return '$symbol$sep$formatted';
|
||||
// For BYN, symbol is empty string, so we use 'Br' for text-only contexts like CSV
|
||||
final displaySymbol = symbol.isEmpty ? 'Br' : symbol;
|
||||
final sep = spaceAfter.contains(displaySymbol) ? ' ' : '';
|
||||
return '$displaySymbol$sep$formatted';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BynSign extends StatelessWidget {
|
||||
final double fontSize;
|
||||
final Color color;
|
||||
|
||||
const BynSign({super.key, required this.fontSize, required this.color});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Transform.translate(
|
||||
offset: Offset(0, fontSize * -0.12),
|
||||
child: Text(
|
||||
'\uE901',
|
||||
style: TextStyle(
|
||||
fontFamily: 'BynSymbol',
|
||||
fontSize: fontSize,
|
||||
color: color,
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.0,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user