Expense input form is now in a popup! Still needs to look and function properly though.

This commit is contained in:
Hyperling 2025-02-05 03:20:29 -07:00
parent 96811f5bfd
commit aa3c2f9304

View File

@ -67,14 +67,20 @@ class _HomePageState extends State<HomePage> {
throw UnimplementedError('No widget for page $pageSelected yet!'); throw UnimplementedError('No widget for page $pageSelected yet!');
} }
Widget newValue() { Future<void> addNewValue(BuildContext context) {
return AlertDialog(title: Text("Add New Value"), content: dialog); return showDialog(
context: context,
builder: (_) =>
AlertDialog(title: Text("Add New Value"), content: dialog)
);
} }
Widget? floatingButton; Widget? floatingButton;
if (dialog != null) { if (dialog != null) {
floatingButton = IconButton( floatingButton = IconButton(
onPressed: newValue, onPressed: () {
addNewValue(context);
},
icon: Icon(Icons.add), icon: Icon(Icons.add),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
); );
@ -140,7 +146,6 @@ class ExpensePage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ListView( return ListView(
children: [ children: [
ExpenseInputForm(),
ListTile( ListTile(
title: Text("Fake Item 1"), title: Text("Fake Item 1"),
subtitle: Text("30.00 / month"), subtitle: Text("30.00 / month"),