mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 19:26:37 +00:00
mobile coin control navigation and amount label fixes
This commit is contained in:
parent
44d6510a77
commit
15d42834aa
3 changed files with 27 additions and 21 deletions
|
@ -49,7 +49,7 @@ class CoinControlView extends ConsumerStatefulWidget {
|
||||||
|
|
||||||
final String walletId;
|
final String walletId;
|
||||||
final CoinControlViewType type;
|
final CoinControlViewType type;
|
||||||
final int? requestedTotal;
|
final Amount? requestedTotal;
|
||||||
final Set<UTXO>? selectedUTXOs;
|
final Set<UTXO>? selectedUTXOs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -673,7 +673,7 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
|
||||||
),
|
),
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
int selectedSum =
|
final int selectedSumInt =
|
||||||
_selectedAvailable.isEmpty
|
_selectedAvailable.isEmpty
|
||||||
? 0
|
? 0
|
||||||
: _selectedAvailable
|
: _selectedAvailable
|
||||||
|
@ -682,15 +682,19 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
|
||||||
(value, element) =>
|
(value, element) =>
|
||||||
value += element,
|
value += element,
|
||||||
);
|
);
|
||||||
|
final selectedSum =
|
||||||
|
selectedSumInt.toAmountAsRaw(
|
||||||
|
fractionDigits: coin.decimals,
|
||||||
|
);
|
||||||
return Text(
|
return Text(
|
||||||
"${selectedSum.toAmountAsRaw(fractionDigits: coin.decimals).localizedStringAsFixed(
|
"${selectedSum.localizedStringAsFixed(
|
||||||
locale: ref.watch(
|
locale: ref.watch(
|
||||||
localeServiceChangeNotifierProvider
|
localeServiceChangeNotifierProvider
|
||||||
.select(
|
.select(
|
||||||
(value) => value.locale,
|
(value) => value.locale,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)} ${coin.ticker}",
|
)} ${coin.ticker}",
|
||||||
style: widget.requestedTotal == null
|
style: widget.requestedTotal == null
|
||||||
? STextStyles.w600_14(context)
|
? STextStyles.w600_14(context)
|
||||||
: STextStyles.w600_14(context).copyWith(
|
: STextStyles.w600_14(context).copyWith(
|
||||||
|
@ -731,14 +735,14 @@ class _CoinControlViewState extends ConsumerState<CoinControlView> {
|
||||||
style: STextStyles.w600_14(context),
|
style: STextStyles.w600_14(context),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"${widget.requestedTotal!.toAmountAsRaw(fractionDigits: coin.decimals).localizedStringAsFixed(
|
"${widget.requestedTotal!.localizedStringAsFixed(
|
||||||
locale: ref.watch(
|
locale: ref.watch(
|
||||||
localeServiceChangeNotifierProvider
|
localeServiceChangeNotifierProvider
|
||||||
.select(
|
.select(
|
||||||
(value) => value.locale,
|
(value) => value.locale,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)} ${coin.ticker}",
|
)} ${coin.ticker}",
|
||||||
style: STextStyles.w600_14(context),
|
style: STextStyles.w600_14(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -124,13 +124,15 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"${utxo.value.toAmountAsRaw(fractionDigits: coin.decimals).localizedStringAsFixed(
|
"${utxo.value.toAmountAsRaw(
|
||||||
|
fractionDigits: coin.decimals,
|
||||||
|
).localizedStringAsFixed(
|
||||||
locale: ref.watch(
|
locale: ref.watch(
|
||||||
localeServiceChangeNotifierProvider.select(
|
localeServiceChangeNotifierProvider.select(
|
||||||
(value) => value.locale,
|
(value) => value.locale,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)}} ${coin.ticker}",
|
)} ${coin.ticker}",
|
||||||
style: STextStyles.w600_14(context),
|
style: STextStyles.w600_14(context),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
|
|
@ -337,7 +337,7 @@ class RouteGenerator {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (args
|
} else if (args
|
||||||
is Tuple4<String, CoinControlViewType, int?, Set<UTXO>?>) {
|
is Tuple4<String, CoinControlViewType, Amount?, Set<UTXO>?>) {
|
||||||
return getRoute(
|
return getRoute(
|
||||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
builder: (_) => CoinControlView(
|
builder: (_) => CoinControlView(
|
||||||
|
|
Loading…
Reference in a new issue