Skip to content

Commit

Permalink
calculate inflated amount
Browse files Browse the repository at this point in the history
  • Loading branch information
praslnx8 committed Dec 16, 2023
1 parent db3fd9f commit 6cf99bd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/ui/pages/create_goal_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class _CreateGoalPage extends PageState<CreateGoalPageViewState, CreateGoalPage,
final _nameController = TextEditingController();
final _amountController = TextEditingController();
final _targetDateController = TextEditingController();
final _targetAmountController = TextEditingController();

@override
void initState() {
Expand Down Expand Up @@ -95,15 +96,21 @@ class _CreateGoalPage extends PageState<CreateGoalPageViewState, CreateGoalPage,
min: 0,
max: 20,
divisions: 20,
value: (snapshot.inflation ?? 0),
value: (snapshot.inflation),
onChanged: (value) {
presenter.inflationChanged(value);
}),
),
Text(
"Inflation: ${(snapshot.inflation ?? 0)}",
"Inflation: ${(snapshot.inflation)}",
style: Theme.of(context).textTheme.labelMedium,
),
Padding(
padding: const EdgeInsets.all(AppDimen.minPadding),
child: Text(
"Target Amount: ${snapshot.getTargetAmount()}",
),
),
Padding(
padding: const EdgeInsets.all(AppDimen.minPadding),
child: DropdownButtonFormField<GoalImportance>(
Expand Down

0 comments on commit 6cf99bd

Please sign in to comment.