Skip to content

Commit

Permalink
Merge branch 'master' into feature/material-3
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/widgets/nutrition/meal.dart
#	lib/widgets/workouts/day.dart
  • Loading branch information
rolandgeider committed Nov 10, 2023
2 parents e287e6a + 10bfb78 commit 95f863a
Show file tree
Hide file tree
Showing 102 changed files with 369 additions and 544 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions android/app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M43.5,51V40.5H37.5V42H33V43.5H28.5V51H27V57H28.5V64.5H33V66H37.5V67.5H43.5V57H64.5V67.5H70.5V66H75V64.5H79.5V57H81V51H79.5V43.5H75V42H70.5V40.5H64.5V51H43.5ZM42,42H39V66H42V42ZM43.5,52.5V55.5H64.5V52.5H43.5ZM66,66H69V42H66V66ZM33,63V45H30V63H33ZM34.5,43.5V64.5H37.5V43.5H34.5ZM75,45V63H78V45H75ZM73.5,64.5V43.5H70.5V64.5H73.5Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
</vector>
1 change: 1 addition & 0 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file removed assets_dev/logo_adaptive.png
Binary file not shown.
2 changes: 1 addition & 1 deletion integration_test/5_nutritional_plan.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'package:wger/theme/theme.dart';
import '../test/user/provider_test.mocks.dart';

Widget createNutritionalPlanScreen({locale = 'en'}) {
var mockBaseProvider = MockWgerBaseProvider();
final mockBaseProvider = MockWgerBaseProvider();

final key = GlobalKey<NavigatorState>();

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/helpers/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Iterable<Color> generateChartColors(int nrOfItems) sync* {
for (final color in colors) {
yield color;
}
}
}
1 change: 1 addition & 0 deletions lib/helpers/consts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const LANGUAGE_SHORT_ENGLISH = 'en';
///
/// Values taken from exercises/models/image.py
enum EXERCISE_IMAGE_ART_STYLE {
// ignore: unused_field
_, // 0 is not used
LINE_ART,
THREE_D,
Expand Down
3 changes: 1 addition & 2 deletions lib/models/body_weight/weight_entry.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 7 additions & 15 deletions lib/models/exercises/base.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/exercises/category.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/exercises/image.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions lib/models/exercises/translation.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions lib/models/measurements/measurement_category.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/measurements/measurement_entry.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/nutrition/image.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/nutrition/ingredient.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions lib/models/nutrition/ingredient_weight_unit.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions lib/models/nutrition/log.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/nutrition/nutritional_plan.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions lib/models/nutrition/nutritional_values.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import 'dart:ui';

class NutritionalValues {
double energy = 0;
double protein = 0;
Expand Down
3 changes: 1 addition & 2 deletions lib/models/nutrition/weight_unit.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions lib/models/user/profile.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/workouts/repetition_unit.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions lib/models/workouts/session.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/workouts/weight_unit.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/models/workouts/workout_plan.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/providers/gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class GalleryProvider extends WgerBaseProvider with ChangeNotifier {
}

Future<void> deleteImage(gallery.Image image) async {
var response = await deleteRequest(_galleryUrlPath, image.id!);
final response = await deleteRequest(_galleryUrlPath, image.id!);
images.removeWhere((element) => element.id == image.id);

notifyListeners();
Expand Down
12 changes: 7 additions & 5 deletions lib/screens/auth_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,19 @@ class _AuthCardState extends State<AuthCard> {
_isLoading = false;
});
} on WgerHttpException catch (error) {
showHttpExceptionErrorDialog(error, context);
if (mounted) {
showHttpExceptionErrorDialog(error, context);
}
setState(() {
_isLoading = false;
});
} catch (error) {
if (mounted) {
showErrorDialog(error, context);
setState(() {
_isLoading = false;
});
}
setState(() {
_isLoading = false;
});
}
}

Expand Down Expand Up @@ -249,7 +251,7 @@ class _AuthCardState extends State<AuthCard> {
if (value == null || value.isEmpty) {
return AppLocalizations.of(context).invalidUsername;
}
if (!RegExp(r'^[\w.@+-]+$').hasMatch(value!)) {
if (!RegExp(r'^[\w.@+-]+$').hasMatch(value)) {
return AppLocalizations.of(context).usernameValidChars;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/add_exercise/add_exercise_dropdown_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class _AddExerciseDropdownButtonState extends State<AddExerciseDropdownButton> {
items: widget.items
.map(
(item) => DropdownMenuItem<String>(
child: Text(item),
value: item,
child: Text(item),
),
)
.toList(),
Expand Down
4 changes: 3 additions & 1 deletion lib/widgets/add_exercise/mixins/image_picker_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ mixin ExerciseImagePickerMixin {
}

if (!isFileValid) {
showDialog(context: context, builder: (context) => Text(errorMessage));
if (context.mounted) {
showDialog(context: context, builder: (context) => Text(errorMessage));
}
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/core/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import 'package:wger/widgets/user/forms.dart';
class MainAppBar extends StatelessWidget implements PreferredSizeWidget {
final String _title;

MainAppBar(this._title);
const MainAppBar(this._title);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -116,7 +116,7 @@ class MainAppBar extends StatelessWidget implements PreferredSizeWidget {
class EmptyAppBar extends StatelessWidget implements PreferredSizeWidget {
final String _title;

EmptyAppBar(this._title);
const EmptyAppBar(this._title);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/core/text_prompt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TextPrompt extends StatelessWidget {
style: Theme.of(context).textTheme.headlineMedium,
),
Padding(
padding: EdgeInsets.only(top: 12),
padding: const EdgeInsets.only(top: 12),
child: Text(AppLocalizations.of(context).textPromptSubheading),
),
],
Expand Down
Loading

0 comments on commit 95f863a

Please sign in to comment.