desktop tx details scroll fix

This commit is contained in:
julian 2022-10-29 13:44:37 -06:00
parent 5fd47de9a2
commit 32eb9bb920

View file

@ -252,7 +252,8 @@ class _TransactionDetailsViewState
const DesktopDialogCloseButton(),
],
),
Padding(
Expanded(
child: Padding(
padding: isDesktop
? const EdgeInsets.only(
right: 32,
@ -265,6 +266,7 @@ class _TransactionDetailsViewState
: null,
padding: const EdgeInsets.all(0),
child: SingleChildScrollView(
primary: isDesktop ? false : null,
child: Padding(
padding: isDesktop
? const EdgeInsets.all(0)
@ -310,7 +312,8 @@ class _TransactionDetailsViewState
_transaction.isCancelled
? "Cancelled"
: whatIsIt(_transaction.txType),
style: STextStyles.desktopTextMedium(
style:
STextStyles.desktopTextMedium(
context),
),
],
@ -326,7 +329,8 @@ class _TransactionDetailsViewState
? (amount / 10000.toDecimal())
.toDecimal()
: coin == Coin.wownero
? (amount / 1000.toDecimal())
? (amount /
1000.toDecimal())
.toDecimal()
: amount,
locale: ref.watch(
@ -346,21 +350,24 @@ class _TransactionDetailsViewState
.extension<StackColors>()!
.textDark,
)
: STextStyles.titleBold12(context),
: STextStyles.titleBold12(
context),
),
const SizedBox(
height: 2,
),
if (ref.watch(
prefsChangeNotifierProvider.select(
(value) => value.externalCalls)))
(value) =>
value.externalCalls)))
SelectableText(
"$amountPrefix${Format.localizedStringAsFixed(value: (coin == Coin.monero ? (amount / 10000.toDecimal()).toDecimal() : coin == Coin.wownero ? (amount / 1000.toDecimal()).toDecimal() : amount) * ref.watch(priceAnd24hChangeNotifierProvider.select((value) => value.getPrice(coin).item1)), locale: ref.watch(
localeServiceChangeNotifierProvider
.select((value) =>
value.locale),
), decimalPlaces: 2)} ${ref.watch(
prefsChangeNotifierProvider.select(
prefsChangeNotifierProvider
.select(
(value) => value.currency,
),
)}",
@ -430,8 +437,10 @@ class _TransactionDetailsViewState
),
),
if (!((coin == Coin.monero || coin == Coin.wownero) &&
_transaction.txType.toLowerCase() == "sent") &&
!((coin == Coin.firo || coin == Coin.firoTestNet) &&
_transaction.txType.toLowerCase() ==
"sent") &&
!((coin == Coin.firo ||
coin == Coin.firoTestNet) &&
_transaction.subType == "mint"))
isDesktop
? const _Divider()
@ -439,19 +448,23 @@ class _TransactionDetailsViewState
height: 12,
),
if (!((coin == Coin.monero || coin == Coin.wownero) &&
_transaction.txType.toLowerCase() == "sent") &&
!((coin == Coin.firo || coin == Coin.firoTestNet) &&
_transaction.txType.toLowerCase() ==
"sent") &&
!((coin == Coin.firo ||
coin == Coin.firoTestNet) &&
_transaction.subType == "mint"))
RoundedWhiteContainer(
padding: isDesktop
? const EdgeInsets.all(16)
: const EdgeInsets.all(12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
_transaction.txType.toLowerCase() ==
@ -490,7 +503,8 @@ class _TransactionDetailsViewState
.desktopTextExtraExtraSmall(
context)
.copyWith(
color: Theme.of(context)
color: Theme.of(
context)
.extension<
StackColors>()!
.textDark,
@ -546,7 +560,8 @@ class _TransactionDetailsViewState
"Note",
style: isDesktop
? STextStyles
.desktopTextExtraExtraSmall(context)
.desktopTextExtraExtraSmall(
context)
: STextStyles.itemSubtitle(context),
),
isDesktop
@ -594,8 +609,8 @@ class _TransactionDetailsViewState
),
Text(
"Edit",
style:
STextStyles.link2(context),
style: STextStyles.link2(
context),
),
],
),
@ -607,7 +622,8 @@ class _TransactionDetailsViewState
),
FutureBuilder(
future: ref.watch(
notesServiceChangeNotifierProvider(walletId)
notesServiceChangeNotifierProvider(
walletId)
.select((value) => value.getNoteFor(
txid: _transaction.txid))),
builder: (builderContext,
@ -655,7 +671,8 @@ class _TransactionDetailsViewState
"Date",
style: isDesktop
? STextStyles
.desktopTextExtraExtraSmall(context)
.desktopTextExtraExtraSmall(
context)
: STextStyles.itemSubtitle(context),
),
if (isDesktop)
@ -676,7 +693,8 @@ class _TransactionDetailsViewState
.extension<StackColors>()!
.textDark,
)
: STextStyles.itemSubtitle12(context),
: STextStyles.itemSubtitle12(
context),
),
],
),
@ -686,7 +704,8 @@ class _TransactionDetailsViewState
_transaction.timestamp,
),
style: isDesktop
? STextStyles.desktopTextExtraExtraSmall(
? STextStyles
.desktopTextExtraExtraSmall(
context)
.copyWith(
color: Theme.of(context)
@ -728,11 +747,13 @@ class _TransactionDetailsViewState
localeServiceChangeNotifierProvider
.select(
(value) => value.locale)),
decimalPlaces: Constants.decimalPlaces)
decimalPlaces:
Constants.decimalPlaces)
: "Pending"
: Format.localizedStringAsFixed(
value: coin == Coin.monero
? (fee / 10000.toDecimal()).toDecimal()
? (fee / 10000.toDecimal())
.toDecimal()
: coin == Coin.wownero
? (fee / 1000.toDecimal())
.toDecimal()
@ -743,11 +764,13 @@ class _TransactionDetailsViewState
decimalPlaces: Constants.decimalPlaces);
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Transaction fee",
@ -815,11 +838,13 @@ class _TransactionDetailsViewState
: "Pending";
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Block height",
@ -884,7 +909,8 @@ class _TransactionDetailsViewState
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Transaction ID",
@ -912,7 +938,8 @@ class _TransactionDetailsViewState
.extension<StackColors>()!
.textDark,
)
: STextStyles.itemSubtitle12(context),
: STextStyles.itemSubtitle12(
context),
),
if (coin != Coin.epicCash)
const SizedBox(
@ -1081,10 +1108,12 @@ class _TransactionDetailsViewState
: const EdgeInsets.all(12),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Slate ID",
@ -1109,7 +1138,8 @@ class _TransactionDetailsViewState
.extension<StackColors>()!
.textDark,
)
: STextStyles.itemSubtitle12(context),
: STextStyles.itemSubtitle12(
context),
),
// ),
// ),
@ -1136,6 +1166,7 @@ class _TransactionDetailsViewState
),
),
),
),
],
),
),