hide empty tx note field on mobile confirm send screen

This commit is contained in:
julian 2023-07-20 16:04:01 -06:00
parent 8a84c89824
commit 24d443886e

View file

@ -493,51 +493,54 @@ class _ConfirmTransactionViewState
], ],
), ),
), ),
if (coin == Coin.epicCash) if (coin == Coin.epicCash &&
(transactionInfo["onChainNote"] as String).isNotEmpty)
const SizedBox( const SizedBox(
height: 12, height: 12,
), ),
if (coin == Coin.epicCash) if (coin == Coin.epicCash &&
(transactionInfo["onChainNote"] as String).isNotEmpty)
RoundedWhiteContainer( RoundedWhiteContainer(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Text( Text(
"On chain note", "On chain note",
style: STextStyles.smallMed12(context), style: STextStyles.smallMed12(context),
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
Text( Text(
transactionInfo["onChainNote"] as String, transactionInfo["onChainNote"] as String,
style: STextStyles.itemSubtitle12(context), style: STextStyles.itemSubtitle12(context),
), ),
], ],
),
), ),
), if ((transactionInfo["note"] as String).isNotEmpty)
const SizedBox( const SizedBox(
height: 12, height: 12,
), ),
RoundedWhiteContainer( if ((transactionInfo["note"] as String).isNotEmpty)
child: Column( RoundedWhiteContainer(
crossAxisAlignment: CrossAxisAlignment.stretch, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.stretch,
Text( children: [
(coin == Coin.epicCash) ? "Local Note" : Text(
"Note", (coin == Coin.epicCash) ? "Local Note" : "Note",
style: STextStyles.smallMed12(context), style: STextStyles.smallMed12(context),
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
Text( Text(
transactionInfo["note"] as String, transactionInfo["note"] as String,
style: STextStyles.itemSubtitle12(context), style: STextStyles.itemSubtitle12(context),
), ),
], ],
),
), ),
),
], ],
), ),
if (isDesktop) if (isDesktop)