A lot of messing around until something actually finally sorta worked!
This commit is contained in:
parent
b227ddc849
commit
a4ad5823aa
@ -1,3 +1,6 @@
|
||||
// Helpful guides:
|
||||
// - https://flutter.dev/docs/cookbook/forms/validation
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
@ -9,11 +12,75 @@ class MainApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
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(
|
||||
home: Scaffold(
|
||||
body: Center(
|
||||
child: Text('Hello World!'),
|
||||
),
|
||||
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()
|
||||
|
||||
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user