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!');
}
Widget newValue() {
return AlertDialog(title: Text("Add New Value"), content: dialog);
Future<void> addNewValue(BuildContext context) {
return showDialog(
context: context,
builder: (_) =>
AlertDialog(title: Text("Add New Value"), content: dialog)
);
}
Widget? floatingButton;
if (dialog != null) {
floatingButton = IconButton(
onPressed: newValue,
onPressed: () {
addNewValue(context);
},
icon: Icon(Icons.add),
color: Theme.of(context).colorScheme.onSurface,
);
@ -140,7 +146,6 @@ class ExpensePage extends StatelessWidget {
Widget build(BuildContext context) {
return ListView(
children: [
ExpenseInputForm(),
ListTile(
title: Text("Fake Item 1"),
subtitle: Text("30.00 / month"),