final version
parent
8c21a2888b
commit
c4260348f1
|
@ -470,19 +470,20 @@ class AccountDetailPageState extends State<AccountDetailPage>
|
|||
}
|
||||
|
||||
Widget _buildTransactionsList(List<Transaction> transactionsList) {
|
||||
|
||||
return ListView.separated(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
itemCount: transactionsList.length,
|
||||
itemBuilder: (context, index) {
|
||||
final reversedIndex = transactionsList.length - 1 - index; // Berechnung des umgekehrten Index
|
||||
final revtrans=transactionsList[reversedIndex];
|
||||
final formattedDate = DateFormat.yMMMMd().add_Hm().format(revtrans.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[reversedIndex]),
|
||||
child: ListTile(
|
||||
|
||||
title: Text(
|
||||
transactionsList[reversedIndex].title,
|
||||
style: TextStyle(
|
||||
|
@ -490,11 +491,13 @@ class AccountDetailPageState extends State<AccountDetailPage>
|
|||
? Colors.white54
|
||||
: Colors.black87),
|
||||
),
|
||||
subtitle:Text(
|
||||
subtitle: Text(
|
||||
formattedDate,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Theme.of(context).brightness == Brightness.dark ? Colors.grey[600] : Colors.grey[400],
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Colors.grey[600]
|
||||
: Colors.grey[400],
|
||||
),
|
||||
),
|
||||
trailing: Text(
|
||||
|
|
|
@ -50,7 +50,9 @@ class AddAccountDialogState extends State<AddAccountDialog> {
|
|||
),
|
||||
titleTextStyle: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Theme.of(context).brightness==Brightness.dark?Colors.white70:Colors.black87,
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Colors.white70
|
||||
: Colors.black87,
|
||||
),
|
||||
content: Form(
|
||||
key: _formKey,
|
||||
|
|
|
@ -71,7 +71,6 @@ class HomePageState extends State<HomePage> {
|
|||
if (prefs.getString(key) == "CHF") {
|
||||
_selectedCurrency = "CHF";
|
||||
}
|
||||
|
||||
return prefs.getString(key) ?? 'Euro';
|
||||
}
|
||||
|
||||
|
@ -100,7 +99,6 @@ class HomePageState extends State<HomePage> {
|
|||
Future<void> loadAccounts() async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
final accountList = prefs.getStringList('accounts') ?? [];
|
||||
|
||||
setState(() {
|
||||
accounts = accountList
|
||||
.map((accountJson) => Account.fromJson(accountJson))
|
||||
|
|
|
@ -20,7 +20,6 @@ class Settings extends StatefulWidget {
|
|||
class SettingsState extends State<Settings> {
|
||||
String _selectedLanguage = 'English';
|
||||
String _selectedCurrency = 'Euro';
|
||||
|
||||
final List<String> _languages = ['English', 'Deutsch'];
|
||||
final List<String> _currencies = ['Euro', 'Dollar', 'CHF'];
|
||||
|
||||
|
@ -81,7 +80,6 @@ class SettingsState extends State<Settings> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
checkForLanguage(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
|
|
|
@ -20,7 +20,6 @@ class SavingsTipsDialog extends StatelessWidget {
|
|||
'tip13'.tr(),
|
||||
'tip14'.tr(),
|
||||
'tip15'.tr(),
|
||||
|
||||
];
|
||||
|
||||
SavingsTipsDialog({super.key});
|
||||
|
|
|
@ -1,58 +1,54 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
final grey200=Colors.grey[200];
|
||||
final grey300=Colors.grey[300];
|
||||
final grey400=Colors.grey[400];
|
||||
final grey700=Colors.grey[700];
|
||||
final grey800=Colors.grey[800];
|
||||
final grey600=Colors.grey[600];
|
||||
final grey200 = Colors.grey[200];
|
||||
final grey300 = Colors.grey[300];
|
||||
final grey400 = Colors.grey[400];
|
||||
final grey700 = Colors.grey[700];
|
||||
final grey800 = Colors.grey[800];
|
||||
final grey600 = Colors.grey[600];
|
||||
final ThemeData lightTheme = ThemeData(
|
||||
scaffoldBackgroundColor: Colors.grey[100],
|
||||
textTheme: const TextTheme(
|
||||
displayLarge:(TextStyle(color: Colors.black87)),
|
||||
displayLarge: (TextStyle(color: Colors.black87)),
|
||||
displayMedium: (TextStyle(color: Colors.black87)),
|
||||
displaySmall:(TextStyle(color: Colors.black87)),
|
||||
labelLarge:(TextStyle(color: Colors.black87)),
|
||||
labelMedium:(TextStyle(color: Colors.black87)),
|
||||
labelSmall:(TextStyle(color: Colors.black87)),
|
||||
headlineLarge:(TextStyle(color: Colors.black87)),
|
||||
headlineMedium:(TextStyle(color: Colors.black87)),
|
||||
headlineSmall:(TextStyle(color: Colors.black87)),
|
||||
titleLarge:(TextStyle(color: Colors.black87)),
|
||||
titleMedium:(TextStyle(color: Colors.black87)),
|
||||
titleSmall:(TextStyle(color: Colors.black87)),
|
||||
displaySmall: (TextStyle(color: Colors.black87)),
|
||||
labelLarge: (TextStyle(color: Colors.black87)),
|
||||
labelMedium: (TextStyle(color: Colors.black87)),
|
||||
labelSmall: (TextStyle(color: Colors.black87)),
|
||||
headlineLarge: (TextStyle(color: Colors.black87)),
|
||||
headlineMedium: (TextStyle(color: Colors.black87)),
|
||||
headlineSmall: (TextStyle(color: Colors.black87)),
|
||||
titleLarge: (TextStyle(color: Colors.black87)),
|
||||
titleMedium: (TextStyle(color: Colors.black87)),
|
||||
titleSmall: (TextStyle(color: Colors.black87)),
|
||||
bodyLarge: (TextStyle(color: Colors.black54)),
|
||||
bodyMedium:(TextStyle(color: Colors.black54)),
|
||||
bodySmall: (TextStyle(color: Colors.black54))
|
||||
),
|
||||
bodyMedium: (TextStyle(color: Colors.black54)),
|
||||
bodySmall: (TextStyle(color: Colors.black54))),
|
||||
brightness: Brightness.light,
|
||||
shadowColor: Colors.grey[300],
|
||||
cardColor: Colors.black87,
|
||||
unselectedWidgetColor: Colors.black54,
|
||||
fontFamily: "Montserrat",
|
||||
buttonTheme: ButtonThemeData(
|
||||
buttonColor: Colors.grey[100],
|
||||
textTheme: ButtonTextTheme.primary
|
||||
),
|
||||
|
||||
buttonColor: Colors.grey[100], textTheme: ButtonTextTheme.primary),
|
||||
);
|
||||
|
||||
final ThemeData darkTheme = ThemeData(
|
||||
textTheme: const TextTheme(
|
||||
displayLarge:(TextStyle(color: Colors.white70)),
|
||||
displayLarge: (TextStyle(color: Colors.white70)),
|
||||
displayMedium: (TextStyle(color: Colors.white70)),
|
||||
displaySmall:(TextStyle(color: Colors.white70)),
|
||||
labelLarge:(TextStyle(color: Colors.white70)),
|
||||
labelMedium:(TextStyle(color: Colors.white70)),
|
||||
labelSmall:(TextStyle(color: Colors.white70)),
|
||||
headlineLarge:(TextStyle(color: Colors.white70)),
|
||||
headlineMedium:(TextStyle(color: Colors.white70)),
|
||||
headlineSmall:(TextStyle(color: Colors.white70)),
|
||||
titleLarge:(TextStyle(color: Colors.white70)),
|
||||
titleMedium:(TextStyle(color: Colors.white70)),
|
||||
titleSmall:(TextStyle(color: Colors.white70)),
|
||||
displaySmall: (TextStyle(color: Colors.white70)),
|
||||
labelLarge: (TextStyle(color: Colors.white70)),
|
||||
labelMedium: (TextStyle(color: Colors.white70)),
|
||||
labelSmall: (TextStyle(color: Colors.white70)),
|
||||
headlineLarge: (TextStyle(color: Colors.white70)),
|
||||
headlineMedium: (TextStyle(color: Colors.white70)),
|
||||
headlineSmall: (TextStyle(color: Colors.white70)),
|
||||
titleLarge: (TextStyle(color: Colors.white70)),
|
||||
titleMedium: (TextStyle(color: Colors.white70)),
|
||||
titleSmall: (TextStyle(color: Colors.white70)),
|
||||
bodyLarge: (TextStyle(color: Colors.white54)),
|
||||
bodyMedium:(TextStyle(color: Colors.white54)),
|
||||
bodyMedium: (TextStyle(color: Colors.white54)),
|
||||
bodySmall: (TextStyle(color: Colors.white54)),
|
||||
),
|
||||
shadowColor: Colors.grey[700],
|
||||
|
|
17
pubspec.yaml
17
pubspec.yaml
|
@ -1,21 +1,8 @@
|
|||
name: tests
|
||||
description: A new Flutter project.
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
description: A Finance planner to keep control of budget.
|
||||
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
# followed by an optional build number separated by a +.
|
||||
# Both the version and the builder number may be overridden in flutter
|
||||
# build by specifying --build-name and --build-number, respectively.
|
||||
# In Android, build-name is used as versionName while build-number used as versionCode.
|
||||
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
|
|
Loading…
Reference in New Issue