mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-30 09:42:50 +01:00
Merge pull request #633 from wger-project/pr/sizzlesloth/632
improve pr 632
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -66,7 +67,7 @@
|
||||
- Norwegian Bokmål
|
||||
|
||||
- Allan Nordhøy <epost@anotheragency.no> (98)
|
||||
|
||||
|
||||
- Japanese
|
||||
|
||||
- Kosei TANAKA <wms784.app@gmail.com> (97)
|
||||
@@ -76,5 +77,5 @@
|
||||
- Nenza Nurfirmansyah <nnurfirmansyah@gmail.com> (73)
|
||||
|
||||
- Croatian
|
||||
|
||||
|
||||
- Sandi Milohaic <sandi.milohanic@gmail.com>
|
||||
|
||||
@@ -43,7 +43,7 @@ class WeightScreen extends StatelessWidget {
|
||||
FormScreen.routeName,
|
||||
arguments: FormScreenArguments(
|
||||
AppLocalizations.of(context).newEntry,
|
||||
WeightForm(lastWeightEntry?.copyWith(id: null)),
|
||||
WeightForm(lastWeightEntry?.copyWith(id: null, date: DateTime.now())),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -209,7 +209,9 @@ class _DashboardWeightWidgetState extends State<DashboardWeightWidget> {
|
||||
FormScreen.routeName,
|
||||
arguments: FormScreenArguments(
|
||||
AppLocalizations.of(context).newEntry,
|
||||
WeightForm(weightProvider.getNewestEntry()?.copyWith(id: null)),
|
||||
WeightForm(weightProvider
|
||||
.getNewestEntry()
|
||||
?.copyWith(id: null, date: DateTime.now())),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -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 {}
|
||||
},
|
||||
),
|
||||
@@ -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 {}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -52,10 +52,10 @@ void main() {
|
||||
expect(find.text('79'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byKey(const Key('quickMinusSmall')));
|
||||
expect(find.text('78.75'), findsOneWidget);
|
||||
expect(find.text('78.9'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byKey(const Key('quickPlus')));
|
||||
expect(find.text('79.75'), findsOneWidget);
|
||||
expect(find.text('79.9'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byKey(const Key('quickPlusSmall')));
|
||||
expect(find.text('80.0'), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user