Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
- Bassam Mutairi - <https://github.com/mutairibassam>
- Dieter Plaetinck - <https://github.com/Dieterbe>
- Dennis van Peer - <https://github.com/Denpeer>
- sizzlesloth - <https://github.com/sizzlesloth>

## Translators

- Saudi Arabian
- Hanaa Allohibi <Gmail: programmerHanaa>
- Hanaa Allohibi <Gmail: programmerHanaa>

- German

Expand Down Expand Up @@ -66,7 +67,7 @@
- Norwegian Bokmål

- Allan Nordhøy <epost@anotheragency.no> (98)

- Japanese

- Kosei TANAKA <wms784.app@gmail.com> (97)
Expand All @@ -76,5 +77,5 @@
- Nenza Nurfirmansyah <nnurfirmansyah@gmail.com> (73)

- Croatian

- Sandi Milohaic <sandi.milohanic@gmail.com>
2 changes: 1 addition & 1 deletion lib/models/body_weight/weight_entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class WeightEntry {
WeightEntry copyWith({int? id, int? weight, DateTime? date}) => WeightEntry(
id: id,
weight: weight ?? this.weight,
date: date ?? this.date,
date: date ?? DateTime.now(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you call copyWith(), you expect that it copies the model, and overrides those fields that are given.
therefore this change doesn't make sense. Instead, the callers should just provide whichever date they want to use (DateTime.now())

);

// Boilerplate
Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/weight/forms.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class WeightForm extends StatelessWidget {
icon: const FaIcon(FontAwesomeIcons.minus),
onPressed: () {
try {
final num newValue = num.parse(weightController.text) - 0.25;
weightController.text = newValue.toString();
final num newValue = num.parse(weightController.text) - 0.1;
weightController.text = newValue.toStringAsFixed(1);
} on FormatException {}
},
),
Expand All @@ -125,8 +125,8 @@ class WeightForm extends StatelessWidget {
icon: const FaIcon(FontAwesomeIcons.plus),
onPressed: () {
try {
final num newValue = num.parse(weightController.text) + 0.25;
weightController.text = newValue.toString();
final num newValue = num.parse(weightController.text) + 0.1;
weightController.text = newValue.toStringAsFixed(1);
} on FormatException {}
},
),
Expand Down