Feat: Macht die Dashboard-Seite funktional

This commit is contained in:
2025-12-31 16:44:29 +01:00
parent f765ba6268
commit 4014757319
9 changed files with 845 additions and 239 deletions

View File

@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
import '../../Controller/account_controller.dart';
import '../../Controller/recurring_transaction_controller.dart';
import '../../Controller/transaction_controller.dart';
/// Ein Floating Action Button, der beim Klicken ein expandierendes Menü öffnet,
/// um neue Transaktionen oder Konten anzulegen.
@@ -15,6 +17,10 @@ class FloatingCreationButton extends StatefulWidget {
class _FloatingCreationButtonState extends State<FloatingCreationButton> {
final AccountController _accountController = AccountController();
final RecurringTransactionController _recurringTransactionController =
RecurringTransactionController();
final TransactionController _transactionController = TransactionController();
final _key = GlobalKey<ExpandableFabState>();
@override
@@ -27,16 +33,22 @@ class _FloatingCreationButtonState extends State<FloatingCreationButton> {
childrenAnimation: ExpandableFabAnimation.none,
distance: 70,
children: <Widget>[
_expandableButton(
label: 'Neue Transaktion',
icon: Icons.add,
onPressed: () {},
),
_expandableButton(
label: 'Neues Konto',
icon: Icons.account_balance_wallet,
onPressed: _accountController.newAccountHandler,
),
_expandableButton(
label: 'Neue Transaktion',
icon: Icons.swap_horiz,
onPressed: _transactionController.newTransactionHandler,
),
_expandableButton(
label: 'Neue wiederkehrende Transaktion',
icon: Icons.repeat,
onPressed:
_recurringTransactionController.newRecurringTransactionHandler,
),
],
);