mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Changed max-line to 100
This commit is contained in:
@@ -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('-------------------');
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user