A lot of messing around until something actually finally sorta worked!
This commit is contained in:
		@@ -1,3 +1,6 @@
 | 
				
			|||||||
 | 
					// Helpful guides:
 | 
				
			||||||
 | 
					// - https://flutter.dev/docs/cookbook/forms/validation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void main() {
 | 
					void main() {
 | 
				
			||||||
@@ -9,11 +12,75 @@ class MainApp extends StatelessWidget {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) {
 | 
					  Widget build(BuildContext context) {
 | 
				
			||||||
 | 
					    const recurranceValues = <DropdownMenuEntry>[
 | 
				
			||||||
 | 
					      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(
 | 
					    return const MaterialApp(
 | 
				
			||||||
      home: Scaffold(
 | 
					      home: Scaffold(
 | 
				
			||||||
        body: Center(
 | 
					        body: Column(mainAxisSize: MainAxisSize.min, children: [
 | 
				
			||||||
          child: Text('Hello World!'),
 | 
					          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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ]),
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user