From 9b6e7e9ccfe45b6a555f02168e45a0435a55d6ae Mon Sep 17 00:00:00 2001 From: Github-actions Date: Wed, 6 Oct 2021 19:05:37 +0000 Subject: [PATCH] Automatic linting --- lib/widgets/workouts/gym_mode.dart | 33 ++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/lib/widgets/workouts/gym_mode.dart b/lib/widgets/workouts/gym_mode.dart index 9ecc9aca..3096a7e7 100644 --- a/lib/widgets/workouts/gym_mode.dart +++ b/lib/widgets/workouts/gym_mode.dart @@ -84,7 +84,8 @@ class _GymModeState extends State { for (final set in widget._workoutDay.sets) { var firstPage = true; for (final setting in set.settingsComputed) { - final exercise = Provider.of(context, listen: false).findById(setting.exerciseId); + final exercise = + Provider.of(context, listen: false).findById(setting.exerciseId); if (firstPage) { _exercisePages[exercise.name] = currentPage; @@ -153,7 +154,8 @@ class _GymModeState extends State { ), ...getContent(), SessionPage( - Provider.of(context, listen: false).findById(widget._workoutDay.workoutId), + Provider.of(context, listen: false) + .findById(widget._workoutDay.workoutId), _controller, widget._start, _exercisePages, @@ -482,7 +484,8 @@ class _LogPageState extends State { // Save the entry on the server try { - await Provider.of(context, listen: false).addLog(widget._log); + await Provider.of(context, listen: false) + .addLog(widget._log); ScaffoldMessenger.of(context).showSnackBar( SnackBar( duration: Duration(seconds: 2), // default is 4 @@ -522,7 +525,8 @@ class _LogPageState extends State { ...widget._workoutPlan.filterLogsByExercise(widget._exercise, unique: true).map((log) { return ListTile( title: Text(log.singleLogRepTextNoNl), - subtitle: Text(DateFormat.yMd(Localizations.localeOf(context).languageCode).format(log.date)), + subtitle: + Text(DateFormat.yMd(Localizations.localeOf(context).languageCode).format(log.date)), trailing: Icon(Icons.copy), onTap: () { setState(() { @@ -630,10 +634,12 @@ class _LogPageState extends State { ), SizedBox(height: 10), Expanded( - child: - (widget._workoutPlan.filterLogsByExercise(widget._exercise).isNotEmpty) ? getPastLogs() : Container()), + child: (widget._workoutPlan.filterLogsByExercise(widget._exercise).isNotEmpty) + ? getPastLogs() + : Container()), // Only show calculator for barbell - if (widget._log.exerciseObj.equipment.map((e) => e.id).contains(ID_EQUIPMENT_BARBELL)) getPlates(), + if (widget._log.exerciseObj.equipment.map((e) => e.id).contains(ID_EQUIPMENT_BARBELL)) + getPlates(), Padding( padding: const EdgeInsets.symmetric(horizontal: 15), child: Card( @@ -780,7 +786,9 @@ class _SessionPageState extends State { renderBorder: false, onPressed: (int index) { setState(() { - for (int buttonIndex = 0; buttonIndex < selectedImpression.length; buttonIndex++) { + for (int buttonIndex = 0; + buttonIndex < selectedImpression.length; + buttonIndex++) { _session.impression = index + 1; if (buttonIndex == index) { @@ -844,7 +852,8 @@ class _SessionPageState extends State { SizedBox(width: 10), Flexible( child: TextFormField( - decoration: InputDecoration(labelText: AppLocalizations.of(context).timeEnd), + decoration: + InputDecoration(labelText: AppLocalizations.of(context).timeEnd), controller: timeEndController, onFieldSubmitted: (_) {}, onTap: () async { @@ -878,7 +887,8 @@ class _SessionPageState extends State { // Save the entry on the server try { - await Provider.of(context, listen: false).addSession(_session); + await Provider.of(context, listen: false) + .addSession(_session); Navigator.of(context).pop(); } on WgerHttpException catch (error) { showHttpExceptionErrorDialog(error, context); @@ -985,7 +995,8 @@ class NavigationFooter extends StatelessWidget { final bool showPrevious; final bool showNext; - const NavigationFooter(this._controller, this._ratioCompleted, {this.showPrevious = true, this.showNext = true}); + const NavigationFooter(this._controller, this._ratioCompleted, + {this.showPrevious = true, this.showNext = true}); @override Widget build(BuildContext context) {