Refactor to add header to the Tracked Item pages.

This commit is contained in:
2025-03-27 14:31:34 -07:00
parent 2d9c93fec4
commit e896611bd1
3 changed files with 261 additions and 207 deletions
+6 -6
View File
@@ -56,7 +56,7 @@ class _HomePageState extends State<HomePage> {
switch (pageSelected) {
case 0:
page = TrackedItemPage(
assetsToLoad: DatabaseHelper.instance.getExpenses(),
assetType: ItemType.expense,
notifyParent: refresh,
);
dialog = TrackedItemInputDialog(
@@ -66,7 +66,7 @@ class _HomePageState extends State<HomePage> {
break;
case 1:
page = TrackedItemPage(
assetsToLoad: DatabaseHelper.instance.getIncomes(),
assetType: ItemType.income,
notifyParent: refresh,
);
dialog = TrackedItemInputDialog(
@@ -76,7 +76,7 @@ class _HomePageState extends State<HomePage> {
break;
case 2:
page = TrackedItemPage(
assetsToLoad: DatabaseHelper.instance.getAssets(),
assetType: ItemType.asset,
notifyParent: refresh,
);
dialog = TrackedItemInputDialog(
@@ -120,15 +120,15 @@ class _HomePageState extends State<HomePage> {
destinations: [
NavigationRailDestination(
icon: Icon(Icons.payment),
label: Text('Expenses'),
label: Text(ItemType.expense.plural),
),
NavigationRailDestination(
icon: Icon(Icons.account_balance),
label: Text('Income'),
label: Text(ItemType.income.plural),
),
NavigationRailDestination(
icon: Icon(Icons.attach_money),
label: Text('Liquid Assets'),
label: Text(ItemType.asset.plural),
),
NavigationRailDestination(
icon: Icon(Icons.bar_chart),