This commit is contained in:
Hillel Coren 2018-12-13 21:16:23 +02:00
parent 43977220f2
commit dc1472570c
1 changed files with 7 additions and 5 deletions

View File

@ -71,9 +71,11 @@ class _ProjectEditState extends State<ProjectEdit> {
} }
void _onChanged() { void _onChanged() {
final project = widget.viewModel.project.rebuild( final project = widget.viewModel.project.rebuild((b) => b
(b) => b..name = _nameController.text.trim(), ..name = _nameController.text.trim()
); ..budgetedHours = parseDouble(_hoursController.text)
..taskRate = parseDouble(_taskRateController.text)
..privateNotes = _privateNotesController.text.trim());
if (project != widget.viewModel.project) { if (project != widget.viewModel.project) {
widget.viewModel.onChanged(project); widget.viewModel.onChanged(project);
} }
@ -157,8 +159,8 @@ class _ProjectEditState extends State<ProjectEdit> {
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
controller: _hoursController, controller: _hoursController,
decoration: InputDecoration( decoration: InputDecoration(
//labelText: localization.budgetedHours, //labelText: localization.budgetedHours,
), ),
), ),
TextFormField( TextFormField(
keyboardType: TextInputType.number, keyboardType: TextInputType.number,