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