Changed max-line to 100

This commit is contained in:
Patrick Witter
2021-08-30 15:05:14 -05:00
parent b53551c753
commit 3dc32259de
2 changed files with 6 additions and 12 deletions

View File

@@ -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('-------------------');

View File

@@ -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<BodyWeightProvider>(context, listen: false)
.findByDate(day) ==
return Provider.of<BodyWeightProvider>(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<BodyWeightProvider>(context,
listen: false)
? await Provider.of<BodyWeightProvider>(context, listen: false)
.addEntry(_weightEntry)
: await Provider.of<BodyWeightProvider>(context,
listen: false)
: await Provider.of<BodyWeightProvider>(context, listen: false)
.editEntry(_weightEntry);
} on WgerHttpException catch (error) {
showHttpExceptionErrorDialog(error, context);