cake_wallet/lib/core/amount.dart

38 lines
1,017 B
Dart
Raw Permalink Normal View History

2022-10-12 17:09:57 +00:00
// abstract class Amount {
// Amount(this.value);
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// int value;
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// int minorDigits;
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// String code;
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// String formatted();
// }
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// class MoneroAmount extends Amount {
// MoneroAmount(int value) : super(value) {
// minorDigits = 12;
// code = 'XMR';
// }
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// // const moneroAmountLength = 12;
// // const moneroAmountDivider = 1000000000000;
// // final moneroAmountFormat = NumberFormat()
// // ..maximumFractionDigits = moneroAmountLength
// // ..minimumFractionDigits = 1;
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// // String moneroAmountToString({int amount}) =>
// // moneroAmountFormat.format(cryptoAmountToDouble(amount: amount, divider: moneroAmountDivider));
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// // double moneroAmountToDouble({int amount}) => cryptoAmountToDouble(amount: amount, divider: moneroAmountDivider);
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// // int moneroParseAmount({String amount}) => moneroAmountFormat.parse(amount).toInt();
2020-09-21 11:50:26 +00:00
2022-10-12 17:09:57 +00:00
// @override
// String formatted() {
// // TODO: implement formatted
// throw UnimplementedError();
// }
// }