umgekehrte liste (neueste elemente zuerst)
parent
16e5828147
commit
8c21a2888b
|
@ -458,7 +458,7 @@ class AccountDetailPageState extends State<AccountDetailPage>
|
|||
isMaxProgressReached
|
||||
? Container()
|
||||
: Text(
|
||||
'Budget: $maxProgress',
|
||||
'Budget: ${maxProgress.round()}$_selectedCurrency',
|
||||
style: textStyle,
|
||||
),
|
||||
],
|
||||
|
@ -475,15 +475,16 @@ class AccountDetailPageState extends State<AccountDetailPage>
|
|||
physics: const BouncingScrollPhysics(),
|
||||
itemCount: transactionsList.length,
|
||||
itemBuilder: (context, index) {
|
||||
final transaction = transactionsList[index];
|
||||
final formattedDate = DateFormat.yMMMMd().add_Hm().format(transaction.date);
|
||||
final reversedIndex = transactionsList.length - 1 - index; // Berechnung des umgekehrten Index
|
||||
final revtrans=transactionsList[reversedIndex];
|
||||
final formattedDate = DateFormat.yMMMMd().add_Hm().format(revtrans.date);
|
||||
return GestureDetector(
|
||||
onLongPress: () =>
|
||||
_showDeleteConfirmationDialog(transactionsList[index]),
|
||||
_showDeleteConfirmationDialog(transactionsList[reversedIndex]),
|
||||
child: ListTile(
|
||||
|
||||
title: Text(
|
||||
transactionsList[index].title,
|
||||
transactionsList[reversedIndex].title,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Colors.white54
|
||||
|
@ -497,11 +498,11 @@ class AccountDetailPageState extends State<AccountDetailPage>
|
|||
),
|
||||
),
|
||||
trailing: Text(
|
||||
transactionsList[index].isExpense
|
||||
? '-$_selectedCurrency${transactionsList[index].amount.toStringAsFixed(2)}'
|
||||
: '+$_selectedCurrency${transactionsList[index].amount.toStringAsFixed(2)}',
|
||||
transactionsList[reversedIndex].isExpense
|
||||
? '-$_selectedCurrency${transactionsList[reversedIndex].amount.toStringAsFixed(2)}'
|
||||
: '+$_selectedCurrency${transactionsList[reversedIndex].amount.toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
color: transactionsList[index].isExpense
|
||||
color: transactionsList[reversedIndex].isExpense
|
||||
? Colors.red
|
||||
: Colors.green,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
|
|
@ -83,7 +83,7 @@ class SavingsTipsDialog extends StatelessWidget {
|
|||
initialPage: 0,
|
||||
enableInfiniteScroll: true,
|
||||
autoPlay: true,
|
||||
autoPlayInterval: const Duration(seconds: 4),
|
||||
autoPlayInterval: const Duration(seconds: 3),
|
||||
autoPlayAnimationDuration: const Duration(milliseconds: 700),
|
||||
autoPlayCurve: Curves.fastOutSlowIn,
|
||||
pauseAutoPlayOnTouch: true,
|
||||
|
|
Loading…
Reference in New Issue