|
Before Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 719 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
10
android/app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -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>();
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 841 B After Width: | Height: | Size: 446 B |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 918 B After Width: | Height: | Size: 550 B |
@@ -40,4 +40,4 @@ Iterable<Color> generateChartColors(int nrOfItems) sync* {
|
||||
for (final color in colors) {
|
||||
yield color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_zxing/flutter_zxing.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/providers/add_exercise.dart';
|
||||
import 'package:wger/providers/base_provider.dart';
|
||||
@@ -50,8 +52,6 @@ import 'package:wger/theme/theme.dart';
|
||||
import 'package:wger/widgets/core/about.dart';
|
||||
|
||||
import 'providers/auth.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_zxing/flutter_zxing.dart';
|
||||
|
||||
void main() {
|
||||
zx.setLogEnabled(kDebugMode);
|
||||
|
||||
@@ -18,8 +18,7 @@ WeightEntry _$WeightEntryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'weight': numToString(instance.weight),
|
||||
'date': toDate(instance.date),
|
||||
|
||||
@@ -24,26 +24,18 @@ ExerciseBase _$ExerciseBaseFromJson(Map<String, dynamic> json) {
|
||||
return ExerciseBase(
|
||||
id: json['id'] as int?,
|
||||
uuid: json['uuid'] as String?,
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
lastUpdate: json['last_update'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_update'] as String),
|
||||
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
|
||||
lastUpdate: json['last_update'] == null ? null : DateTime.parse(json['last_update'] as String),
|
||||
variationId: json['variations'] as int?,
|
||||
)
|
||||
..categoryId = json['category'] as int
|
||||
..musclesIds =
|
||||
(json['muscles'] as List<dynamic>).map((e) => e as int).toList()
|
||||
..musclesSecondaryIds = (json['muscles_secondary'] as List<dynamic>)
|
||||
.map((e) => e as int)
|
||||
.toList()
|
||||
..equipmentIds =
|
||||
(json['equipment'] as List<dynamic>).map((e) => e as int).toList();
|
||||
..musclesIds = (json['muscles'] as List<dynamic>).map((e) => e as int).toList()
|
||||
..musclesSecondaryIds =
|
||||
(json['muscles_secondary'] as List<dynamic>).map((e) => e as int).toList()
|
||||
..equipmentIds = (json['equipment'] as List<dynamic>).map((e) => e as int).toList();
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseBaseToJson(ExerciseBase instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseBaseToJson(ExerciseBase instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'variations': instance.variationId,
|
||||
|
||||
@@ -17,8 +17,7 @@ ExerciseCategory _$ExerciseCategoryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -20,8 +20,7 @@ ExerciseImage _$ExerciseImageFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'exercise_base': instance.exerciseBaseId,
|
||||
|
||||
@@ -22,17 +22,14 @@ Translation _$TranslationFromJson(Map<String, dynamic> json) {
|
||||
return Translation(
|
||||
id: json['id'] as int?,
|
||||
uuid: json['uuid'] as String?,
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
baseId: json['exercise_base'] as int?,
|
||||
)..languageId = json['language'] as int;
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$TranslationToJson(Translation instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$TranslationToJson(Translation instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'language': instance.languageId,
|
||||
|
||||
@@ -22,9 +22,7 @@ MeasurementCategory _$MeasurementCategoryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$MeasurementCategoryToJson(
|
||||
MeasurementCategory instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$MeasurementCategoryToJson(MeasurementCategory instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
|
||||
@@ -20,8 +20,7 @@ MeasurementEntry _$MeasurementEntryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'category': instance.category,
|
||||
'date': toDate(instance.date),
|
||||
|
||||
@@ -38,8 +38,7 @@ IngredientImage _$IngredientImageFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'ingredient_id': instance.ingredientId,
|
||||
|
||||
@@ -43,8 +43,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientToJson(Ingredient instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$IngredientToJson(Ingredient instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'code': instance.code,
|
||||
'name': instance.name,
|
||||
|
||||
@@ -13,16 +13,14 @@ IngredientWeightUnit _$IngredientWeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
return IngredientWeightUnit(
|
||||
id: json['id'] as int,
|
||||
weightUnit:
|
||||
WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
|
||||
weightUnit: WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
|
||||
ingredient: Ingredient.fromJson(json['ingredient'] as Map<String, dynamic>),
|
||||
grams: json['grams'] as int,
|
||||
amount: (json['amount'] as num).toDouble(),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientWeightUnitToJson(
|
||||
IngredientWeightUnit instance) =>
|
||||
Map<String, dynamic> _$IngredientWeightUnitToJson(IngredientWeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'weight_unit': instance.weightUnit,
|
||||
|
||||
@@ -9,14 +9,7 @@ part of 'log.dart';
|
||||
Log _$LogFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'plan',
|
||||
'datetime',
|
||||
'ingredient',
|
||||
'weight_unit',
|
||||
'amount'
|
||||
],
|
||||
requiredKeys: const ['id', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount'],
|
||||
);
|
||||
return Log(
|
||||
id: json['id'] as int?,
|
||||
|
||||
@@ -18,8 +18,7 @@ NutritionalPlan _$NutritionalPlanFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'description': instance.description,
|
||||
'creation_date': toDate(instance.creationDate),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -17,8 +17,7 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -9,12 +9,7 @@ part of 'profile.dart';
|
||||
Profile _$ProfileFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'username',
|
||||
'email_verified',
|
||||
'is_trustworthy',
|
||||
'email'
|
||||
],
|
||||
requiredKeys: const ['username', 'email_verified', 'is_trustworthy', 'email'],
|
||||
);
|
||||
return Profile(
|
||||
username: json['username'] as String,
|
||||
|
||||
@@ -17,8 +17,7 @@ RepetitionUnit _$RepetitionUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -9,14 +9,7 @@ part of 'session.dart';
|
||||
WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'workout',
|
||||
'date',
|
||||
'impression',
|
||||
'time_start',
|
||||
'time_end'
|
||||
],
|
||||
requiredKeys: const ['id', 'workout', 'date', 'impression', 'time_start', 'time_end'],
|
||||
);
|
||||
return WorkoutSession()
|
||||
..id = json['id'] as int?
|
||||
@@ -28,8 +21,7 @@ WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
|
||||
..timeEnd = stringToTime(json['time_end'] as String?);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'workout': instance.workoutId,
|
||||
'date': toDate(instance.date),
|
||||
|
||||
@@ -17,8 +17,7 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -19,8 +19,7 @@ WorkoutPlan _$WorkoutPlanFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'creation_date': instance.creationDate.toIso8601String(),
|
||||
'name': instance.name,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:wger/widgets/core/app_bar.dart';
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
@@ -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) {
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
|
||||
@@ -25,7 +25,7 @@ import 'package:wger/screens/add_exercise_screen.dart';
|
||||
import 'filter_modal.dart';
|
||||
|
||||
class FilterRow extends StatefulWidget {
|
||||
FilterRow({Key? key}) : super(key: key);
|
||||
const FilterRow({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_FilterRowState createState() => _FilterRowState();
|
||||
@@ -89,8 +89,8 @@ class _FilterRowState extends State<FilterRow> {
|
||||
itemBuilder: (context) {
|
||||
return [
|
||||
PopupMenuItem<ExerciseMoreOption>(
|
||||
child: Text(AppLocalizations.of(context).contributeExercise),
|
||||
value: ExerciseMoreOption.ADD_EXERCISE,
|
||||
child: Text(AppLocalizations.of(context).contributeExercise),
|
||||
)
|
||||
];
|
||||
},
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:wger/models/exercises/video.dart';
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class Gallery extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: RefreshIndicator(
|
||||
onRefresh: () => provider.fetchAndSetGallery(),
|
||||
child: provider.images.length == 0
|
||||
child: provider.images.isEmpty
|
||||
? TextPrompt()
|
||||
: MasonryGridView.count(
|
||||
crossAxisCount: 2,
|
||||
|
||||
@@ -8,10 +8,10 @@ import 'charts.dart';
|
||||
import 'forms.dart';
|
||||
|
||||
class CategoriesCard extends StatelessWidget {
|
||||
MeasurementCategory currentCategory;
|
||||
double? elevation;
|
||||
final MeasurementCategory currentCategory;
|
||||
final double? elevation;
|
||||
|
||||
CategoriesCard(this.currentCategory, {this.elevation});
|
||||
const CategoriesCard(this.currentCategory, {this.elevation});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/exceptions/http_exception.dart';
|
||||
@@ -110,11 +109,17 @@ class MeasurementCategoryForm extends StatelessWidget {
|
||||
: await Provider.of<MeasurementProvider>(context, listen: false).editCategory(
|
||||
categoryData['id'], categoryData['name'], categoryData['unit']);
|
||||
} on WgerHttpException catch (error) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
}
|
||||
} catch (error) {
|
||||
showErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showErrorDialog(error, context);
|
||||
}
|
||||
}
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -272,11 +277,17 @@ class MeasurementEntryForm extends StatelessWidget {
|
||||
_entryData['date'],
|
||||
);
|
||||
} on WgerHttpException catch (error) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
}
|
||||
} catch (error) {
|
||||
showErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showErrorDialog(error, context);
|
||||
}
|
||||
}
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -192,8 +192,8 @@ class MealItemForm extends StatelessWidget {
|
||||
),
|
||||
if (_listMealItems.isNotEmpty) const SizedBox(height: 10.0),
|
||||
Container(
|
||||
child: Text(AppLocalizations.of(context).recentlyUsedIngredients),
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Text(AppLocalizations.of(context).recentlyUsedIngredients),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
@@ -320,8 +320,8 @@ class IngredientLogForm extends StatelessWidget {
|
||||
),
|
||||
if (diaryEntries.isNotEmpty) const SizedBox(height: 10.0),
|
||||
Container(
|
||||
child: Text(AppLocalizations.of(context).recentlyUsedIngredients),
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Text(AppLocalizations.of(context).recentlyUsedIngredients),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
@@ -394,22 +394,30 @@ class PlanForm extends StatelessWidget {
|
||||
try {
|
||||
if (_plan.id != null) {
|
||||
await Provider.of<NutritionPlansProvider>(context, listen: false).editPlan(_plan);
|
||||
Navigator.of(context).pop();
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
} else {
|
||||
_plan = await Provider.of<NutritionPlansProvider>(context, listen: false)
|
||||
.addPlan(_plan);
|
||||
Navigator.of(context).pushReplacementNamed(
|
||||
NutritionalPlanScreen.routeName,
|
||||
arguments: _plan,
|
||||
);
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pushReplacementNamed(
|
||||
NutritionalPlanScreen.routeName,
|
||||
arguments: _plan,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Saving was successful, reset the data
|
||||
_descriptionController.clear();
|
||||
} on WgerHttpException catch (error) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
}
|
||||
} catch (error) {
|
||||
showErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showErrorDialog(error, context);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -223,37 +223,6 @@ class DismissibleMealHeader extends StatelessWidget {
|
||||
return Dismissible(
|
||||
key: Key(_meal.id.toString()),
|
||||
direction: DismissDirection.startToEnd,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: const BoxDecoration(color: Colors.white),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (_meal.name != '')
|
||||
Text(
|
||||
_meal.name,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
_meal.time!.format(context),
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
visualDensity: VisualDensity.compact,
|
||||
icon: _expanded ? const Icon(Icons.unfold_less) : const Icon(Icons.unfold_more),
|
||||
onPressed: () {
|
||||
_toggle();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
background: Container(
|
||||
color: wgerPrimaryButtonColor, //Theme.of(context).primaryColor,
|
||||
alignment: Alignment.centerLeft,
|
||||
@@ -287,6 +256,37 @@ class DismissibleMealHeader extends StatelessWidget {
|
||||
}
|
||||
return false;
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: const BoxDecoration(color: Colors.white),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (_meal.name != '')
|
||||
Text(
|
||||
_meal.name,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
_meal.time!.format(context),
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
visualDensity: VisualDensity.compact,
|
||||
icon: _expanded ? const Icon(Icons.unfold_less) : const Icon(Icons.unfold_more),
|
||||
onPressed: () {
|
||||
_toggle();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class NutritionalPlansList extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return RefreshIndicator(
|
||||
onRefresh: () => _nutritionProvider.fetchAndSetAllPlansSparse(),
|
||||
child: _nutritionProvider.items.length == 0
|
||||
child: _nutritionProvider.items.isEmpty
|
||||
? TextPrompt()
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
|
||||
@@ -16,15 +16,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
//import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:flutter_zxing/flutter_zxing.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/helpers/platform.dart';
|
||||
@@ -32,8 +29,6 @@ import 'package:wger/helpers/ui.dart';
|
||||
import 'package:wger/providers/nutrition.dart';
|
||||
import 'package:wger/widgets/core/core.dart';
|
||||
|
||||
import 'package:flutter_zxing/flutter_zxing.dart';
|
||||
|
||||
class ScanReader extends StatelessWidget {
|
||||
String? scannedr;
|
||||
|
||||
@@ -212,10 +207,12 @@ class _IngredientTypeaheadState extends State<IngredientTypeahead> {
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
showErrorDialog(e, context);
|
||||
// Need to pop back since reader scan is a widget
|
||||
// otherwise returns null when back button is pressed
|
||||
return Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showErrorDialog(e, context);
|
||||
// Need to pop back since reader scan is a widget
|
||||
// otherwise returns null when back button is pressed
|
||||
return Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
},
|
||||
icon: Image.asset('assets/images/barcode_scanner_icon.png'),
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/models/user/profile.dart';
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/exceptions/http_exception.dart';
|
||||
@@ -120,11 +119,17 @@ class WeightForm extends StatelessWidget {
|
||||
: await Provider.of<BodyWeightProvider>(context, listen: false)
|
||||
.editEntry(_weightEntry);
|
||||
} on WgerHttpException catch (error) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
}
|
||||
} catch (error) {
|
||||
showErrorDialog(error, context);
|
||||
if (context.mounted) {
|
||||
showErrorDialog(error, context);
|
||||
}
|
||||
}
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -50,8 +50,8 @@ class SettingWidget extends StatelessWidget {
|
||||
return ListTile(
|
||||
leading: InkWell(
|
||||
child: SizedBox(
|
||||
child: ExerciseImageWidget(image: setting.exerciseBaseObj.getMainImage),
|
||||
width: 45,
|
||||
child: ExerciseImageWidget(image: setting.exerciseBaseObj.getMainImage),
|
||||
),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
@@ -224,19 +224,19 @@ class _WorkoutDayWidgetState extends State<WorkoutDayWidget> {
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
buildDefaultDragHandles: false,
|
||||
onReorder: (_oldIndex, _newIndex) async {
|
||||
int _startIndex = 0;
|
||||
if (_oldIndex < _newIndex) {
|
||||
_newIndex -= 1;
|
||||
_startIndex = _oldIndex;
|
||||
onReorder: (oldIndex, newIndex) async {
|
||||
int startIndex = 0;
|
||||
if (oldIndex < newIndex) {
|
||||
newIndex -= 1;
|
||||
startIndex = oldIndex;
|
||||
} else {
|
||||
_startIndex = _newIndex;
|
||||
startIndex = newIndex;
|
||||
}
|
||||
setState(() {
|
||||
_sets.insert(_newIndex, _sets.removeAt(_oldIndex));
|
||||
_sets.insert(newIndex, _sets.removeAt(oldIndex));
|
||||
});
|
||||
_sets = await Provider.of<WorkoutPlansProvider>(context, listen: false)
|
||||
.reorderSets(_sets, _startIndex);
|
||||
.reorderSets(_sets, startIndex);
|
||||
},
|
||||
children: [
|
||||
for (var i = 0; i < widget._day.sets.length; i++) getSetRow(widget._day.sets[i], i),
|
||||
@@ -283,6 +283,31 @@ class DayHeaderDismissible extends StatelessWidget {
|
||||
return Dismissible(
|
||||
key: Key(_day.id.toString()),
|
||||
direction: DismissDirection.startToEnd,
|
||||
background: Container(
|
||||
color: wgerPrimaryButtonColor, //Theme.of(context).primaryColor,
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).gymMode,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
const Icon(
|
||||
Icons.play_arrow,
|
||||
color: Colors.white,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
confirmDismiss: (direction) async {
|
||||
// Delete day
|
||||
if (direction == DismissDirection.startToEnd) {
|
||||
Navigator.of(context).pushNamed(GymModeScreen.routeName, arguments: _day);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: const BoxDecoration(color: Colors.white),
|
||||
@@ -311,31 +336,6 @@ class DayHeaderDismissible extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
background: Container(
|
||||
color: wgerPrimaryButtonColor, //Theme.of(context).primaryColor,
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).gymMode,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
const Icon(
|
||||
Icons.play_arrow,
|
||||
color: Colors.white,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
confirmDismiss: (direction) async {
|
||||
// Delete day
|
||||
if (direction == DismissDirection.startToEnd) {
|
||||
Navigator.of(context).pushNamed(GymModeScreen.routeName, arguments: _day);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,15 +104,19 @@ class WorkoutForm extends StatelessWidget {
|
||||
// Save to DB
|
||||
if (_plan.id != null) {
|
||||
await Provider.of<WorkoutPlansProvider>(context, listen: false).editWorkout(_plan);
|
||||
Navigator.of(context).pop();
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
} else {
|
||||
final WorkoutPlan newPlan =
|
||||
await Provider.of<WorkoutPlansProvider>(context, listen: false)
|
||||
.addWorkout(_plan);
|
||||
Navigator.of(context).pushReplacementNamed(
|
||||
WorkoutPlanScreen.routeName,
|
||||
arguments: newPlan,
|
||||
);
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pushReplacementNamed(
|
||||
WorkoutPlanScreen.routeName,
|
||||
arguments: newPlan,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -541,7 +545,9 @@ class _SetFormWidgetState extends State<SetFormWidget> {
|
||||
widget._day.sets.add(widget._set);
|
||||
|
||||
// Close the bottom sheet
|
||||
Navigator.of(context).pop();
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -466,15 +466,6 @@ class _LogPageState extends State<LogPage> {
|
||||
},
|
||||
),
|
||||
ElevatedButton(
|
||||
child: (!_isSaving)
|
||||
? Text(AppLocalizations.of(context).save)
|
||||
: const SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
),
|
||||
),
|
||||
onPressed: _isSaving
|
||||
? null
|
||||
: () async {
|
||||
@@ -505,13 +496,26 @@ class _LogPageState extends State<LogPage> {
|
||||
);
|
||||
_isSaving = false;
|
||||
} on WgerHttpException catch (error) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
if (mounted) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
}
|
||||
_isSaving = false;
|
||||
} catch (error) {
|
||||
showErrorDialog(error, context);
|
||||
if (mounted) {
|
||||
showErrorDialog(error, context);
|
||||
}
|
||||
_isSaving = false;
|
||||
}
|
||||
},
|
||||
child: (!_isSaving)
|
||||
? Text(AppLocalizations.of(context).save)
|
||||
: const SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -781,17 +785,6 @@ class _SessionPageState extends State<SessionPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ToggleButtons(
|
||||
children: const <Widget>[
|
||||
Icon(
|
||||
Icons.sentiment_very_dissatisfied,
|
||||
),
|
||||
Icon(
|
||||
Icons.sentiment_neutral,
|
||||
),
|
||||
Icon(
|
||||
Icons.sentiment_very_satisfied,
|
||||
),
|
||||
],
|
||||
renderBorder: false,
|
||||
onPressed: (int index) {
|
||||
setState(() {
|
||||
@@ -809,6 +802,17 @@ class _SessionPageState extends State<SessionPage> {
|
||||
});
|
||||
},
|
||||
isSelected: selectedImpression,
|
||||
children: const <Widget>[
|
||||
Icon(
|
||||
Icons.sentiment_very_dissatisfied,
|
||||
),
|
||||
Icon(
|
||||
Icons.sentiment_neutral,
|
||||
),
|
||||
Icon(
|
||||
Icons.sentiment_very_satisfied,
|
||||
),
|
||||
],
|
||||
),
|
||||
TextFormField(
|
||||
decoration: InputDecoration(
|
||||
@@ -902,11 +906,17 @@ class _SessionPageState extends State<SessionPage> {
|
||||
try {
|
||||
await Provider.of<WorkoutPlansProvider>(context, listen: false)
|
||||
.addSession(_session);
|
||||
Navigator.of(context).pop();
|
||||
if (mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
} on WgerHttpException catch (error) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
if (mounted) {
|
||||
showHttpExceptionErrorDialog(error, context);
|
||||
}
|
||||
} catch (error) {
|
||||
showErrorDialog(error, context);
|
||||
if (mounted) {
|
||||
showErrorDialog(error, context);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -45,6 +45,13 @@ class _WorkoutLogsState extends State<WorkoutLogs> {
|
||||
return Column(
|
||||
children: [
|
||||
ToggleButtons(
|
||||
renderBorder: false,
|
||||
onPressed: (int index) {
|
||||
if (index == 0) {
|
||||
widget._changeMode(WorkoutScreenMode.workout);
|
||||
}
|
||||
},
|
||||
isSelected: const [false, true],
|
||||
children: const <Widget>[
|
||||
Icon(
|
||||
Icons.table_chart_outlined,
|
||||
@@ -53,13 +60,6 @@ class _WorkoutLogsState extends State<WorkoutLogs> {
|
||||
Icons.show_chart,
|
||||
),
|
||||
],
|
||||
renderBorder: false,
|
||||
onPressed: (int index) {
|
||||
if (index == 0) {
|
||||
widget._changeMode(WorkoutScreenMode.workout);
|
||||
}
|
||||
},
|
||||
isSelected: const [false, true],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
|
||||
@@ -33,7 +33,7 @@ class WorkoutPlansList extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return RefreshIndicator(
|
||||
onRefresh: () => _workoutProvider.fetchAndSetAllPlansSparse(),
|
||||
child: _workoutProvider.items.length == 0
|
||||
child: _workoutProvider.items.isEmpty
|
||||
? TextPrompt()
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
platform :osx, '10.14'
|
||||
platform :osx, '10.15'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
PODS:
|
||||
- file_selector_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- flutter_zxing (0.0.1):
|
||||
- FlutterMacOS
|
||||
- FlutterMacOS (1.0.0)
|
||||
- package_info_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
@@ -9,18 +13,21 @@ PODS:
|
||||
- FlutterMacOS
|
||||
- url_launcher_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- wakelock_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
|
||||
DEPENDENCIES:
|
||||
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
||||
- flutter_zxing (from `Flutter/ephemeral/.symlinks/plugins/flutter_zxing/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||
- rive_common (from `Flutter/ephemeral/.symlinks/plugins/rive_common/macos`)
|
||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
|
||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||
- wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
file_selector_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
||||
flutter_zxing:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_zxing/macos
|
||||
FlutterMacOS:
|
||||
:path: Flutter/ephemeral
|
||||
package_info_plus:
|
||||
@@ -28,20 +35,19 @@ EXTERNAL SOURCES:
|
||||
rive_common:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/rive_common/macos
|
||||
shared_preferences_foundation:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||
url_launcher_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||
wakelock_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
file_selector_macos: 0f85c1108e2fd597b58246bc0b0c1cb483d7593b
|
||||
flutter_zxing: ea030278aa2a051cd81a5b0053be9d0569d11c9a
|
||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
|
||||
rive_common: e966d74ca90edb3761cfc559d0f4c884ee947576
|
||||
rive_common: acedcab7802c0ece4b0d838b71d7deb637e1309a
|
||||
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
|
||||
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
|
||||
wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9
|
||||
|
||||
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
||||
PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0
|
||||
|
||||
COCOAPODS: 1.12.0
|
||||
COCOAPODS: 1.13.0
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0920;
|
||||
LastUpgradeCheck = 1300;
|
||||
LastUpgradeCheck = 1430;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
33CC10EC2044A3C60003C045 = {
|
||||
@@ -405,7 +405,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
@@ -484,7 +484,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
@@ -531,7 +531,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 318 B |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 990 B After Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -73,16 +73,17 @@ dev_dependencies:
|
||||
flutter_lints: ^3.0.1
|
||||
cider: ^0.2.4
|
||||
|
||||
# Better icons have been added manually, Android now uses vector icon
|
||||
# TODO Consider removing flutter_launcher_icons completely
|
||||
flutter_icons:
|
||||
android: true
|
||||
ios: true
|
||||
android: false
|
||||
ios: false
|
||||
image_path: "assets_dev/logo.png"
|
||||
adaptive_icon_background: "#2a4c7d"
|
||||
adaptive_icon_foreground: "assets_dev/logo_adaptive.png"
|
||||
macos:
|
||||
generate: true
|
||||
generate: false
|
||||
image_path: "assets/images/logo.png"
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ import 'package:wger/providers/user.dart' as _i15;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -86,8 +85,7 @@ class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias {
|
||||
/// A class which mocks [AddExerciseProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockAddExerciseProvider extends _i1.Mock
|
||||
implements _i7.AddExerciseProvider {
|
||||
class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvider {
|
||||
MockAddExerciseProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -376,8 +374,7 @@ class MockAddExerciseProvider extends _i1.Mock
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i4.Translation> addExerciseTranslation(
|
||||
_i4.Translation? exercise) =>
|
||||
_i13.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExerciseTranslation,
|
||||
|
||||
@@ -193,8 +193,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -240,8 +239,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -266,8 +264,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -283,8 +280,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -69,7 +69,7 @@ void main() {
|
||||
final image = gallery.Image(
|
||||
id: 58,
|
||||
date: DateTime(2022, 01, 09),
|
||||
url: "https://wger.de/media/gallery/170335/d2b9c9e0-d541-41ae-8786-a2ab459e3538.jpg",
|
||||
url: 'https://wger.de/media/gallery/170335/d2b9c9e0-d541-41ae-8786-a2ab459e3538.jpg',
|
||||
description: "eggsaddjujuit\'ddayhadIforcanview");
|
||||
|
||||
galleryProvider.images.add(image);
|
||||
|
||||
@@ -193,8 +193,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -240,8 +239,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -266,8 +264,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -283,8 +280,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -23,8 +23,7 @@ import 'package:wger/providers/measurement.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -34,8 +33,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake
|
||||
implements _i3.MeasurementCategory {
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
|
||||
_FakeMeasurementCategory_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -48,8 +46,7 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake
|
||||
/// A class which mocks [MeasurementProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockMeasurementProvider extends _i1.Mock
|
||||
implements _i4.MeasurementProvider {
|
||||
class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvider {
|
||||
MockMeasurementProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -130,8 +127,7 @@ class MockMeasurementProvider extends _i1.Mock
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addCategory,
|
||||
[category],
|
||||
|
||||
@@ -106,8 +106,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -153,8 +152,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -179,8 +177,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -196,8 +193,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -21,29 +21,29 @@ void main() {
|
||||
const String diaryUrl = 'nutritiondiary';
|
||||
const String ingredientUrl = 'ingredient';
|
||||
|
||||
final Map<String, dynamic> NutritionalPlanInfoResponse = jsonDecode(
|
||||
final Map<String, dynamic> nutritionalPlanInfoResponse = jsonDecode(
|
||||
fixture('nutrition/nutritional_plan_info_detail_response.json'),
|
||||
);
|
||||
final Map<String, dynamic> NutritionalPlanDetailResponse = jsonDecode(
|
||||
final Map<String, dynamic> nutritionalPlanDetailResponse = jsonDecode(
|
||||
fixture('nutrition/nutritional_plan_detail_response.json'),
|
||||
);
|
||||
final List<dynamic> NutritionDiaryResponse = jsonDecode(
|
||||
final List<dynamic> nutritionDiaryResponse = jsonDecode(
|
||||
fixture('nutrition/nutrition_diary_response.json'),
|
||||
)['results'];
|
||||
final Map<String, dynamic> Ingredient59887Response = jsonDecode(
|
||||
final Map<String, dynamic> ingredient59887Response = jsonDecode(
|
||||
fixture('nutrition/ingredient_59887_response.json'),
|
||||
);
|
||||
final Map<String, dynamic> Ingredient10065Response = jsonDecode(
|
||||
final Map<String, dynamic> ingredient10065Response = jsonDecode(
|
||||
fixture('nutrition/ingredient_10065_response.json'),
|
||||
);
|
||||
final Map<String, dynamic> Ingredient58300Response = jsonDecode(
|
||||
final Map<String, dynamic> ingredient58300Response = jsonDecode(
|
||||
fixture('nutrition/ingredient_58300_response.json'),
|
||||
);
|
||||
|
||||
final ingredientList = [
|
||||
Ingredient.fromJson(Ingredient59887Response),
|
||||
Ingredient.fromJson(Ingredient10065Response),
|
||||
Ingredient.fromJson(Ingredient58300Response),
|
||||
Ingredient.fromJson(ingredient59887Response),
|
||||
Ingredient.fromJson(ingredient10065Response),
|
||||
Ingredient.fromJson(ingredient58300Response),
|
||||
];
|
||||
|
||||
nutritionProvider.ingredients = ingredientList;
|
||||
@@ -67,13 +67,13 @@ void main() {
|
||||
when(mockWgerBaseProvider.makeUrl(planUrl, id: anyNamed('id'))).thenReturn(planUri);
|
||||
when(mockWgerBaseProvider.makeUrl(diaryUrl, query: anyNamed('query'))).thenReturn(diaryUri);
|
||||
when(mockWgerBaseProvider.fetch(planInfoUri)).thenAnswer(
|
||||
(realInvocation) => Future.value(NutritionalPlanInfoResponse),
|
||||
(realInvocation) => Future.value(nutritionalPlanInfoResponse),
|
||||
);
|
||||
when(mockWgerBaseProvider.fetch(planUri)).thenAnswer(
|
||||
(realInvocation) => Future.value(NutritionalPlanDetailResponse),
|
||||
(realInvocation) => Future.value(nutritionalPlanDetailResponse),
|
||||
);
|
||||
when(mockWgerBaseProvider.fetchPaginated(diaryUri)).thenAnswer(
|
||||
(realInvocation) => Future.value(NutritionDiaryResponse),
|
||||
(realInvocation) => Future.value(nutritionDiaryResponse),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ import 'package:wger/providers/nutrition.dart' as _i7;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -36,8 +35,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake
|
||||
implements _i3.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake implements _i3.NutritionalPlan {
|
||||
_FakeNutritionalPlan_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -80,8 +78,7 @@ class _FakeIngredient_4 extends _i1.SmartFake implements _i6.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i7.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -167,14 +164,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -184,14 +179,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -201,14 +194,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -313,8 +304,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<_i5.MealItem>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -324,8 +314,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
@@ -368,8 +357,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -424,8 +412,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -25,8 +25,7 @@ import 'package:wger/providers/nutrition.dart' as _i7;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -36,8 +35,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake
|
||||
implements _i3.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake implements _i3.NutritionalPlan {
|
||||
_FakeNutritionalPlan_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -80,8 +78,7 @@ class _FakeIngredient_4 extends _i1.SmartFake implements _i6.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i7.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -167,14 +164,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -184,14 +179,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -201,14 +194,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -313,8 +304,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<_i5.MealItem>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -324,8 +314,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
@@ -368,8 +357,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -424,8 +412,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -65,8 +65,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i3.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -121,8 +120,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -168,8 +166,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -194,8 +191,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -211,8 +207,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -277,8 +272,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -410,8 +404,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
#serverUrl: serverUrl,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -429,8 +422,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
serverUrl,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -711,14 +703,12 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
) as _i5.Future<_i9.Uint8List>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -65,8 +65,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -112,8 +111,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -245,8 +243,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
#serverUrl: serverUrl,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -264,8 +261,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
serverUrl,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -388,8 +384,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -435,8 +430,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -461,8 +455,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -478,8 +471,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -711,14 +703,12 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i5.Future<_i9.Uint8List>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -31,8 +31,7 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -245,14 +244,12 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i3.Future<_i5.Uint8List>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -106,8 +106,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -153,8 +152,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -179,8 +177,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -196,8 +193,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -106,8 +106,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -153,8 +152,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -179,8 +177,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -196,8 +193,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -22,8 +22,7 @@ import 'package:wger/providers/body_weight.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -46,8 +45,7 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightProvider extends _i1.Mock
|
||||
implements _i4.BodyWeightProvider {
|
||||
class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider {
|
||||
MockBodyWeightProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -107,8 +105,7 @@ class MockBodyWeightProvider extends _i1.Mock
|
||||
) as _i3.WeightEntry);
|
||||
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
)) as _i3.WeightEntry?);
|
||||
@@ -119,13 +116,11 @@ class MockBodyWeightProvider extends _i1.Mock
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i5.Future<List<_i3.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
|
||||
@@ -68,8 +68,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
implements _i4.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -89,8 +88,7 @@ class _FakeExerciseBase_5 extends _i1.SmartFake implements _i5.ExerciseBase {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_6 extends _i1.SmartFake
|
||||
implements _i6.ExerciseCategory {
|
||||
class _FakeExerciseCategory_6 extends _i1.SmartFake implements _i6.ExerciseCategory {
|
||||
_FakeExerciseCategory_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -175,8 +173,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -222,8 +219,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue:
|
||||
_i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i10.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -248,8 +244,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i10.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -265,8 +260,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i10.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -313,8 +307,7 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
) as _i4.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
set exerciseBases(List<_i5.ExerciseBase>? exercisesBases) =>
|
||||
super.noSuchMethod(
|
||||
set exerciseBases(List<_i5.ExerciseBase>? exercisesBases) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#exerciseBases,
|
||||
exercisesBases,
|
||||
@@ -329,8 +322,7 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
) as List<_i5.ExerciseBase>);
|
||||
|
||||
@override
|
||||
set filteredExerciseBases(List<_i5.ExerciseBase>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
set filteredExerciseBases(List<_i5.ExerciseBase>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExerciseBases,
|
||||
newFilteredExercises,
|
||||
@@ -339,8 +331,7 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<int, List<_i5.ExerciseBase>> get exerciseBasesByVariation =>
|
||||
(super.noSuchMethod(
|
||||
Map<int, List<_i5.ExerciseBase>> get exerciseBasesByVariation => (super.noSuchMethod(
|
||||
Invocation.getter(#exerciseBasesByVariation),
|
||||
returnValue: <int, List<_i5.ExerciseBase>>{},
|
||||
) as Map<int, List<_i5.ExerciseBase>>);
|
||||
@@ -559,8 +550,7 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i5.ExerciseBase> fetchAndSetExerciseBase(int? exerciseBaseId) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<_i5.ExerciseBase> fetchAndSetExerciseBase(int? exerciseBaseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExerciseBase,
|
||||
[exerciseBaseId],
|
||||
@@ -575,8 +565,7 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
) as _i10.Future<_i5.ExerciseBase>);
|
||||
|
||||
@override
|
||||
_i5.ExerciseBase readExerciseBaseFromBaseInfo(dynamic baseData) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.ExerciseBase readExerciseBaseFromBaseInfo(dynamic baseData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readExerciseBaseFromBaseInfo,
|
||||
[baseData],
|
||||
@@ -625,8 +614,7 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i10.Future<List<_i5.ExerciseBase>>.value(<_i5.ExerciseBase>[]),
|
||||
returnValue: _i10.Future<List<_i5.ExerciseBase>>.value(<_i5.ExerciseBase>[]),
|
||||
) as _i10.Future<List<_i5.ExerciseBase>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -31,8 +31,7 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -52,8 +51,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -103,8 +101,7 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake
|
||||
implements _i9.WorkoutSession {
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -127,8 +124,7 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [WorkoutPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockWorkoutPlansProvider extends _i1.Mock
|
||||
implements _i11.WorkoutPlansProvider {
|
||||
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
|
||||
MockWorkoutPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -265,8 +261,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
@@ -281,8 +276,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWorkoutPlanFull,
|
||||
[workoutId],
|
||||
@@ -297,8 +291,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addWorkout,
|
||||
[workout],
|
||||
@@ -313,8 +306,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
@@ -346,8 +338,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -467,8 +458,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
@@ -504,8 +494,7 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
@@ -529,14 +518,12 @@ class MockWorkoutPlansProvider extends _i1.Mock
|
||||
) as _i12.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -22,8 +22,7 @@ import 'package:wger/providers/body_weight.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -46,8 +45,7 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightProvider extends _i1.Mock
|
||||
implements _i4.BodyWeightProvider {
|
||||
class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider {
|
||||
MockBodyWeightProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -107,8 +105,7 @@ class MockBodyWeightProvider extends _i1.Mock
|
||||
) as _i3.WeightEntry);
|
||||
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
)) as _i3.WeightEntry?);
|
||||
@@ -119,13 +116,11 @@ class MockBodyWeightProvider extends _i1.Mock
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i5.Future<List<_i3.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
|
||||