// Helpful guides: // - https://flutter.dev/docs/cookbook/forms/validation import 'package:flutter/material.dart'; void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { const recurranceValues = [ DropdownMenuEntry(value: "D", label: "Daily"), DropdownMenuEntry(value: "W", label: "Weekly"), DropdownMenuEntry(value: "B", label: "Biweekly"), DropdownMenuEntry(value: "M", label: "Monthly"), DropdownMenuEntry(value: "Y", label: "Yearly") ]; return const MaterialApp( home: Scaffold( body: Column(mainAxisSize: MainAxisSize.min, children: [ Text('Input an expense below!'), Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Text("Name: "), SizedBox( width: 400, height: 50, child: TextField( keyboardType: TextInputType.text, )), ], ), Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Text("Cost: "), SizedBox( width: 400, height: 50, child: TextField( keyboardType: TextInputType.numberWithOptions(decimal: true), ), ), ], ), Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Text("Recurrance: "), SizedBox( width: 100, height: 50, child: DropdownMenu(dropdownMenuEntries: recurranceValues)), ], ), Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Text("Description: "), SizedBox( width: 400, height: 50, child: TextField( keyboardType: TextInputType.text, )), ], ), SizedBox() ]), ), ); } }