From d722172cb3f94a77337c1da98e1c69dbdb7fccb9 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 1 Feb 2025 04:17:56 -0700 Subject: [PATCH] Add buttons and fake items. --- lib/main.dart | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index d4103be..2495631 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -123,7 +123,19 @@ class ExpensePage extends StatelessWidget { @override Widget build(BuildContext context) { - return ExpenseInputForm(); + return ListView( + children: [ + ExpenseInputForm(), + ListTile( + title: Text("Fake Item 1"), + subtitle: Text("30.00 / month"), + ), + ListTile( + title: Text("Fake Item 2"), + subtitle: Text("180.00 / year"), + ), + ], + ); } } @@ -139,7 +151,7 @@ class ExpenseInputForm extends StatefulWidget { class _ExpenseInputFormState extends State { @override Widget build(BuildContext context) { - const inputWidth = 400.0; + const inputWidth = 300.0; const inputHeight = 50.0; const recurrenceValues = [ @@ -189,6 +201,28 @@ class _ExpenseInputFormState extends State { labelText: "Description", hintText: "Example: 1GB data with unlimited talk & text."), )), + SizedBox( + width: inputWidth, + height: inputHeight, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ElevatedButton.icon( + onPressed: () { + print("TODO: Clear fields!"); + }, + icon: Icon(Icons.cancel), + label: Text('Cancel'), + ), + ElevatedButton.icon( + onPressed: () { + print("TODO: Save expense!"); + }, + icon: Icon(Icons.save), + label: Text('Submit'), + ), + ], + )) ]), ); }