Make the name of the function more agnostic.

This commit is contained in:
Hyperling 2025-02-01 16:51:12 -07:00
parent c44d4553c3
commit 96811f5bfd

View File

@ -67,14 +67,14 @@ class _HomePageState extends State<HomePage> {
throw UnimplementedError('No widget for page $pageSelected yet!'); throw UnimplementedError('No widget for page $pageSelected yet!');
} }
Widget newExpense() { Widget newValue() {
return AlertDialog(title: Text("Add New Value"), content: dialog); return AlertDialog(title: Text("Add New Value"), content: dialog);
} }
Widget? floatingButton; Widget? floatingButton;
if (dialog != null) { if (dialog != null) {
floatingButton = IconButton( floatingButton = IconButton(
onPressed: newExpense, onPressed: newValue,
icon: Icon(Icons.add), icon: Icon(Icons.add),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
); );