diff --git a/lib/helpers/ui.dart b/lib/helpers/ui.dart index 0b58a46e..71ca147f 100644 --- a/lib/helpers/ui.dart +++ b/lib/helpers/ui.dart @@ -44,8 +44,7 @@ void showErrorDialog(dynamic exception, BuildContext context) { ); } -void showHttpExceptionErrorDialog( - WgerHttpException exception, BuildContext context) async { +void showHttpExceptionErrorDialog(WgerHttpException exception, BuildContext context) async { log('showHttpExceptionErrorDialog: '); log(exception.toString()); log('-------------------'); diff --git a/lib/widgets/weight/forms.dart b/lib/widgets/weight/forms.dart index 602d10ba..db5d67a7 100644 --- a/lib/widgets/weight/forms.dart +++ b/lib/widgets/weight/forms.dart @@ -35,8 +35,7 @@ class WeightForm extends StatelessWidget { WeightForm([WeightEntry? weightEntry]) { this._weightEntry = weightEntry ?? WeightEntry(date: DateTime.now()); - weightController.text = - _weightEntry.id == null ? '' : _weightEntry.weight.toString(); + weightController.text = _weightEntry.id == null ? '' : _weightEntry.weight.toString(); dateController.text = toDate(_weightEntry.date)!; } @@ -69,8 +68,7 @@ class WeightForm extends StatelessWidget { } // if the date is known, don't allow it - return Provider.of(context, listen: false) - .findByDate(day) == + return Provider.of(context, listen: false).findByDate(day) == null ? true : false; @@ -86,8 +84,7 @@ class WeightForm extends StatelessWidget { // Weight TextFormField( - decoration: - InputDecoration(labelText: AppLocalizations.of(context).weight), + decoration: InputDecoration(labelText: AppLocalizations.of(context).weight), controller: weightController, keyboardType: TextInputType.number, onSaved: (newValue) { @@ -118,11 +115,9 @@ class WeightForm extends StatelessWidget { // Save the entry on the server try { _weightEntry.id == null - ? await Provider.of(context, - listen: false) + ? await Provider.of(context, listen: false) .addEntry(_weightEntry) - : await Provider.of(context, - listen: false) + : await Provider.of(context, listen: false) .editEntry(_weightEntry); } on WgerHttpException catch (error) { showHttpExceptionErrorDialog(error, context);