diff --git a/lib/main.dart b/lib/main.dart index 788d8c5..5fc1e8c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -180,48 +180,45 @@ class _ExpenseInputDialogState extends State { ]; return AlertDialog( - title: Text("Add New Expense"), - content: Center( - child: Column(mainAxisSize: MainAxisSize.min, spacing: 10, children: [ - Text('New Expense'), - SizedBox( - width: inputWidth, - height: inputHeight, - child: TextField( - keyboardType: TextInputType.text, - decoration: InputDecoration( - labelText: "Name", - hintText: "Example: Red Pocket Phone Bill", - ), - // https://docs.flutter.dev/cookbook/forms/retrieve-input - //controller: nameFieldController, - )), - SizedBox( + title: Center(child: Text("Add New Expense")), + content: Column(mainAxisSize: MainAxisSize.min, spacing: 10, children: [ + SizedBox( width: inputWidth, height: inputHeight, child: TextField( - keyboardType: TextInputType.numberWithOptions(decimal: true), + keyboardType: TextInputType.text, decoration: InputDecoration( - labelText: "Cost", hintText: "Example: 10.00"), - ), + labelText: "Name", + hintText: "Example: Red Pocket Phone Bill", + ), + // https://docs.flutter.dev/cookbook/forms/retrieve-input + //controller: nameFieldController, + )), + SizedBox( + width: inputWidth, + height: inputHeight, + child: TextField( + keyboardType: TextInputType.numberWithOptions(decimal: true), + decoration: + InputDecoration(labelText: "Cost", hintText: "Example: 10.00"), ), - DropdownMenu( - dropdownMenuEntries: recurrenceValues, + ), + DropdownMenu( + dropdownMenuEntries: recurrenceValues, + width: inputWidth, + label: Text("Recurrence"), + hintText: "Example: Monthly", + ), + SizedBox( width: inputWidth, - label: Text("Recurrence"), - hintText: "Example: Monthly", - ), - SizedBox( - width: inputWidth, - height: inputHeight, - child: TextField( - keyboardType: TextInputType.text, - decoration: InputDecoration( - labelText: "Description", - hintText: "Example: 1GB data with unlimited talk & text."), - )), - ]), - ), + height: inputHeight, + child: TextField( + keyboardType: TextInputType.text, + decoration: InputDecoration( + labelText: "Description", + hintText: "Example: 1GB data with unlimited talk & text."), + )), + ]), actions: [ SizedBox( width: inputWidth,