Refactor to add header to the Tracked Item pages.
This commit is contained in:
+6
-6
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user