mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Refactor update logic
There are a lot of common steps that are always the same. This will specially important once we edit all the other configs and their max siblings
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
@@ -194,11 +195,7 @@ class Exercise extends Equatable {
|
||||
}
|
||||
|
||||
ExerciseImage? get getMainImage {
|
||||
try {
|
||||
return images.firstWhere((image) => image.isMain);
|
||||
} on StateError {
|
||||
return null;
|
||||
}
|
||||
return images.firstWhereOrNull((image) => image.isMain);
|
||||
}
|
||||
|
||||
set setCategory(ExerciseCategory category) {
|
||||
|
||||
@@ -49,8 +49,12 @@ mixin _$ExerciseApiData {
|
||||
@JsonKey(name: 'total_authors_history')
|
||||
List<String> get authorsGlobal => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExerciseApiData to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ExerciseApiData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ExerciseApiDataCopyWith<ExerciseApiData> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -87,6 +91,8 @@ class _$ExerciseApiDataCopyWithImpl<$Res, $Val extends ExerciseApiData>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ExerciseApiData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -204,6 +210,8 @@ class __$$ExerciseBaseDataImplCopyWithImpl<$Res>
|
||||
_$ExerciseBaseDataImpl _value, $Res Function(_$ExerciseBaseDataImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ExerciseApiData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -447,7 +455,7 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
|
||||
const DeepCollectionEquality().equals(other._authorsGlobal, _authorsGlobal));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -467,7 +475,9 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
|
||||
const DeepCollectionEquality().hash(_authors),
|
||||
const DeepCollectionEquality().hash(_authorsGlobal));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ExerciseApiData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ExerciseBaseDataImplCopyWith<_$ExerciseBaseDataImpl> get copyWith =>
|
||||
@@ -505,43 +515,46 @@ abstract class _ExerciseBaseData implements ExerciseApiData {
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
String get uuid;
|
||||
@override // ignore: invalid_annotation_target
|
||||
String get uuid; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'variations')
|
||||
int? get variationId;
|
||||
@override // ignore: invalid_annotation_target
|
||||
int? get variationId; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'created')
|
||||
DateTime get created;
|
||||
@override // ignore: invalid_annotation_target
|
||||
DateTime get created; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'last_update')
|
||||
DateTime get lastUpdate;
|
||||
@override // ignore: invalid_annotation_target
|
||||
DateTime get lastUpdate; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'last_update_global')
|
||||
DateTime get lastUpdateGlobal;
|
||||
@override
|
||||
ExerciseCategory get category;
|
||||
@override
|
||||
List<Muscle> get muscles;
|
||||
@override // ignore: invalid_annotation_target
|
||||
List<Muscle> get muscles; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'muscles_secondary')
|
||||
List<Muscle> get musclesSecondary;
|
||||
@override // ignore: invalid_annotation_target
|
||||
List<Equipment> get equipment;
|
||||
@override // ignore: invalid_annotation_target
|
||||
List<Muscle> get musclesSecondary; // ignore: invalid_annotation_target
|
||||
@override
|
||||
List<Equipment> get equipment; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'translations')
|
||||
List<Translation> get translations;
|
||||
@override
|
||||
List<ExerciseImage> get images;
|
||||
@override
|
||||
List<Video> get videos;
|
||||
@override // ignore: invalid_annotation_target
|
||||
List<Video> get videos; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'author_history')
|
||||
List<String> get authors;
|
||||
@override // ignore: invalid_annotation_target
|
||||
List<String> get authors; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'total_authors_history')
|
||||
List<String> get authorsGlobal;
|
||||
|
||||
/// Create a copy of ExerciseApiData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ExerciseBaseDataImplCopyWith<_$ExerciseBaseDataImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -563,8 +576,12 @@ mixin _$ExerciseSearchDetails {
|
||||
@JsonKey(name: 'image_thumbnail')
|
||||
String? get imageThumbnail => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExerciseSearchDetails to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ExerciseSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ExerciseSearchDetailsCopyWith<ExerciseSearchDetails> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -594,6 +611,8 @@ class _$ExerciseSearchDetailsCopyWithImpl<$Res, $Val extends ExerciseSearchDetai
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ExerciseSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -658,6 +677,8 @@ class __$$ExerciseSearchDetailsImplCopyWithImpl<$Res>
|
||||
_$ExerciseSearchDetailsImpl _value, $Res Function(_$ExerciseSearchDetailsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ExerciseSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -750,12 +771,14 @@ class _$ExerciseSearchDetailsImpl implements _ExerciseSearchDetails {
|
||||
other.imageThumbnail == imageThumbnail));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, translationId, exerciseId, name, category, image, imageThumbnail);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ExerciseSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ExerciseSearchDetailsImplCopyWith<_$ExerciseSearchDetailsImpl> get copyWith =>
|
||||
@@ -782,10 +805,11 @@ abstract class _ExerciseSearchDetails implements ExerciseSearchDetails {
|
||||
factory _ExerciseSearchDetails.fromJson(Map<String, dynamic> json) =
|
||||
_$ExerciseSearchDetailsImpl.fromJson;
|
||||
|
||||
@override // ignore: invalid_annotation_target
|
||||
// ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'id')
|
||||
int get translationId;
|
||||
@override // ignore: invalid_annotation_target
|
||||
int get translationId; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'base_id')
|
||||
int get exerciseId;
|
||||
@override
|
||||
@@ -793,12 +817,15 @@ abstract class _ExerciseSearchDetails implements ExerciseSearchDetails {
|
||||
@override
|
||||
String get category;
|
||||
@override
|
||||
String? get image;
|
||||
@override // ignore: invalid_annotation_target
|
||||
String? get image; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'image_thumbnail')
|
||||
String? get imageThumbnail;
|
||||
|
||||
/// Create a copy of ExerciseSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ExerciseSearchDetailsImplCopyWith<_$ExerciseSearchDetailsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -812,8 +839,12 @@ mixin _$ExerciseSearchEntry {
|
||||
String get value => throw _privateConstructorUsedError;
|
||||
ExerciseSearchDetails get data => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExerciseSearchEntry to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ExerciseSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ExerciseSearchEntryCopyWith<ExerciseSearchEntry> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -839,6 +870,8 @@ class _$ExerciseSearchEntryCopyWithImpl<$Res, $Val extends ExerciseSearchEntry>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ExerciseSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -857,6 +890,8 @@ class _$ExerciseSearchEntryCopyWithImpl<$Res, $Val extends ExerciseSearchEntry>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of ExerciseSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExerciseSearchDetailsCopyWith<$Res> get data {
|
||||
@@ -888,6 +923,8 @@ class __$$ExerciseSearchEntryImplCopyWithImpl<$Res>
|
||||
_$ExerciseSearchEntryImpl _value, $Res Function(_$ExerciseSearchEntryImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ExerciseSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -934,11 +971,13 @@ class _$ExerciseSearchEntryImpl implements _ExerciseSearchEntry {
|
||||
(identical(other.data, data) || other.data == data));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, value, data);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ExerciseSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ExerciseSearchEntryImplCopyWith<_$ExerciseSearchEntryImpl> get copyWith =>
|
||||
@@ -964,8 +1003,11 @@ abstract class _ExerciseSearchEntry implements ExerciseSearchEntry {
|
||||
String get value;
|
||||
@override
|
||||
ExerciseSearchDetails get data;
|
||||
|
||||
/// Create a copy of ExerciseSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ExerciseSearchEntryImplCopyWith<_$ExerciseSearchEntryImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -978,8 +1020,12 @@ ExerciseApiSearch _$ExerciseApiSearchFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ExerciseApiSearch {
|
||||
List<ExerciseSearchEntry> get suggestions => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExerciseApiSearch to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ExerciseApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ExerciseApiSearchCopyWith<ExerciseApiSearch> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1002,6 +1048,8 @@ class _$ExerciseApiSearchCopyWithImpl<$Res, $Val extends ExerciseApiSearch>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ExerciseApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1034,6 +1082,8 @@ class __$$ExerciseApiSearchImplCopyWithImpl<$Res>
|
||||
_$ExerciseApiSearchImpl _value, $Res Function(_$ExerciseApiSearchImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ExerciseApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1078,11 +1128,13 @@ class _$ExerciseApiSearchImpl implements _ExerciseApiSearch {
|
||||
const DeepCollectionEquality().equals(other._suggestions, _suggestions));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_suggestions));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ExerciseApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ExerciseApiSearchImplCopyWith<_$ExerciseApiSearchImpl> get copyWith =>
|
||||
@@ -1104,8 +1156,11 @@ abstract class _ExerciseApiSearch implements ExerciseApiSearch {
|
||||
|
||||
@override
|
||||
List<ExerciseSearchEntry> get suggestions;
|
||||
|
||||
/// Create a copy of ExerciseApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ExerciseApiSearchImplCopyWith<_$ExerciseApiSearchImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,12 @@ mixin _$IngredientApiSearchDetails {
|
||||
@JsonKey(name: 'image_thumbnail')
|
||||
String? get imageThumbnail => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this IngredientApiSearchDetails to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of IngredientApiSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientApiSearchDetailsCopyWith<IngredientApiSearchDetails> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -55,6 +59,8 @@ class _$IngredientApiSearchDetailsCopyWithImpl<$Res, $Val extends IngredientApiS
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of IngredientApiSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -107,6 +113,8 @@ class __$$IngredientApiSearchDetailsImplCopyWithImpl<$Res>
|
||||
$Res Function(_$IngredientApiSearchDetailsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of IngredientApiSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -176,11 +184,13 @@ class _$IngredientApiSearchDetailsImpl implements _IngredientApiSearchDetails {
|
||||
other.imageThumbnail == imageThumbnail));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, image, imageThumbnail);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of IngredientApiSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientApiSearchDetailsImplCopyWith<_$IngredientApiSearchDetailsImpl> get copyWith =>
|
||||
@@ -211,12 +221,15 @@ abstract class _IngredientApiSearchDetails implements IngredientApiSearchDetails
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
String? get image;
|
||||
@override // ignore: invalid_annotation_target
|
||||
String? get image; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(name: 'image_thumbnail')
|
||||
String? get imageThumbnail;
|
||||
|
||||
/// Create a copy of IngredientApiSearchDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientApiSearchDetailsImplCopyWith<_$IngredientApiSearchDetailsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -230,8 +243,12 @@ mixin _$IngredientApiSearchEntry {
|
||||
String get value => throw _privateConstructorUsedError;
|
||||
IngredientApiSearchDetails get data => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this IngredientApiSearchEntry to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of IngredientApiSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientApiSearchEntryCopyWith<IngredientApiSearchEntry> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -257,6 +274,8 @@ class _$IngredientApiSearchEntryCopyWithImpl<$Res, $Val extends IngredientApiSea
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of IngredientApiSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -275,6 +294,8 @@ class _$IngredientApiSearchEntryCopyWithImpl<$Res, $Val extends IngredientApiSea
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of IngredientApiSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$IngredientApiSearchDetailsCopyWith<$Res> get data {
|
||||
@@ -306,6 +327,8 @@ class __$$IngredientApiSearchEntryImplCopyWithImpl<$Res>
|
||||
_$IngredientApiSearchEntryImpl _value, $Res Function(_$IngredientApiSearchEntryImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of IngredientApiSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -352,11 +375,13 @@ class _$IngredientApiSearchEntryImpl implements _IngredientApiSearchEntry {
|
||||
(identical(other.data, data) || other.data == data));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, value, data);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of IngredientApiSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientApiSearchEntryImplCopyWith<_$IngredientApiSearchEntryImpl> get copyWith =>
|
||||
@@ -383,8 +408,11 @@ abstract class _IngredientApiSearchEntry implements IngredientApiSearchEntry {
|
||||
String get value;
|
||||
@override
|
||||
IngredientApiSearchDetails get data;
|
||||
|
||||
/// Create a copy of IngredientApiSearchEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientApiSearchEntryImplCopyWith<_$IngredientApiSearchEntryImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -397,8 +425,12 @@ IngredientApiSearch _$IngredientApiSearchFromJson(Map<String, dynamic> json) {
|
||||
mixin _$IngredientApiSearch {
|
||||
List<IngredientApiSearchEntry> get suggestions => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this IngredientApiSearch to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of IngredientApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientApiSearchCopyWith<IngredientApiSearch> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -422,6 +454,8 @@ class _$IngredientApiSearchCopyWithImpl<$Res, $Val extends IngredientApiSearch>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of IngredientApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -455,6 +489,8 @@ class __$$IngredientApiSearchImplCopyWithImpl<$Res>
|
||||
_$IngredientApiSearchImpl _value, $Res Function(_$IngredientApiSearchImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of IngredientApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -499,11 +535,13 @@ class _$IngredientApiSearchImpl implements _IngredientApiSearch {
|
||||
const DeepCollectionEquality().equals(other._suggestions, _suggestions));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_suggestions));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of IngredientApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientApiSearchImplCopyWith<_$IngredientApiSearchImpl> get copyWith =>
|
||||
@@ -526,8 +564,11 @@ abstract class _IngredientApiSearch implements IngredientApiSearch {
|
||||
|
||||
@override
|
||||
List<IngredientApiSearchEntry> get suggestions;
|
||||
|
||||
/// Create a copy of IngredientApiSearch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientApiSearchImplCopyWith<_$IngredientApiSearchImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ part 'base_config.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class BaseConfig {
|
||||
@JsonKey(required: true)
|
||||
late int id;
|
||||
@JsonKey(required: true, includeToJson: false)
|
||||
late int? id;
|
||||
|
||||
@JsonKey(required: true, name: 'slot_entry')
|
||||
late int slotEntryId;
|
||||
@@ -58,6 +58,13 @@ class BaseConfig {
|
||||
required this.needLogToApply,
|
||||
});
|
||||
|
||||
BaseConfig.firstIteration(this.value, this.slotEntryId) {
|
||||
iteration = 1;
|
||||
operation = 'r';
|
||||
step = 'abs';
|
||||
needLogToApply = false;
|
||||
}
|
||||
|
||||
// Boilerplate
|
||||
factory BaseConfig.fromJson(Map<String, dynamic> json) => _$BaseConfigFromJson(json);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ BaseConfig _$BaseConfigFromJson(Map<String, dynamic> json) {
|
||||
],
|
||||
);
|
||||
return BaseConfig(
|
||||
id: (json['id'] as num).toInt(),
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
slotEntryId: (json['slot_entry'] as num).toInt(),
|
||||
iteration: (json['iteration'] as num).toInt(),
|
||||
value: stringOrIntToNum(json['value']),
|
||||
@@ -31,7 +31,6 @@ BaseConfig _$BaseConfigFromJson(Map<String, dynamic> json) {
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$BaseConfigToJson(BaseConfig instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'slot_entry': instance.slotEntryId,
|
||||
'iteration': instance.iteration,
|
||||
'value': instance.value,
|
||||
|
||||
@@ -27,7 +27,7 @@ class Day {
|
||||
static const MAX_LENGTH_NAME = 20;
|
||||
static const MAX_LENGTH_DESCRIPTION = 1000;
|
||||
|
||||
@JsonKey(required: true)
|
||||
@JsonKey(required: true, includeToJson: false)
|
||||
int? id;
|
||||
|
||||
@JsonKey(required: true, name: 'routine')
|
||||
|
||||
@@ -38,7 +38,6 @@ Day _$DayFromJson(Map<String, dynamic> json) {
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$DayToJson(Day instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'routine': instance.routineId,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
|
||||
@@ -39,7 +39,7 @@ class Routine {
|
||||
/// In weeks
|
||||
static const MAX_DURATION = 16;
|
||||
|
||||
@JsonKey(required: true)
|
||||
@JsonKey(required: true, includeToJson: false)
|
||||
int? id;
|
||||
|
||||
@JsonKey(required: true)
|
||||
|
||||
@@ -26,7 +26,6 @@ Routine _$RoutineFromJson(Map<String, dynamic> json) {
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$RoutineToJson(Routine instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created': instance.created.toIso8601String(),
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
|
||||
@@ -26,7 +26,7 @@ part 'slot.g.dart';
|
||||
class Slot {
|
||||
static const DEFAULT_NR_SETS = 4;
|
||||
|
||||
@JsonKey(required: true)
|
||||
@JsonKey(required: true, includeToJson: false)
|
||||
int? id;
|
||||
|
||||
@JsonKey(required: false)
|
||||
|
||||
@@ -24,7 +24,6 @@ Slot _$SlotFromJson(Map<String, dynamic> json) {
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$SlotToJson(Slot instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'day': instance.day,
|
||||
'order': instance.order,
|
||||
'comment': instance.comment,
|
||||
|
||||
@@ -25,6 +25,12 @@ import 'package:wger/models/workouts/weight_unit.dart';
|
||||
|
||||
part 'slot_entry.g.dart';
|
||||
|
||||
enum ConfigType {
|
||||
weight,
|
||||
reps,
|
||||
sets,
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class SlotEntry {
|
||||
/// Allowed RiR values. This list must be kept in sync with RIR_OPTIONS in the
|
||||
@@ -32,7 +38,7 @@ class SlotEntry {
|
||||
static const POSSIBLE_RIR_VALUES = ['', '0', '0.5', '1', '1.5', '2', '2.5', '3', '3.5', '4'];
|
||||
static const DEFAULT_RIR = '';
|
||||
|
||||
@JsonKey(required: true)
|
||||
@JsonKey(required: true, includeToJson: false)
|
||||
int? id;
|
||||
|
||||
@JsonKey(required: true, name: 'slot')
|
||||
@@ -84,7 +90,7 @@ class SlotEntry {
|
||||
late List<BaseConfig> maxWeightConfigs;
|
||||
|
||||
@JsonKey(required: true, name: 'set_nr_configs')
|
||||
late List<BaseConfig> setNrConfigs;
|
||||
late List<BaseConfig> nrOfSetsConfigs;
|
||||
|
||||
@JsonKey(required: true, name: 'rir_configs')
|
||||
late List<BaseConfig> rirConfigs;
|
||||
@@ -117,6 +123,17 @@ class SlotEntry {
|
||||
return 'DELETE ME! RIR';
|
||||
}
|
||||
|
||||
List<BaseConfig> getConfigsByType(ConfigType type) {
|
||||
switch (type) {
|
||||
case ConfigType.weight:
|
||||
return weightConfigs;
|
||||
case ConfigType.sets:
|
||||
return nrOfSetsConfigs;
|
||||
case ConfigType.reps:
|
||||
return repsConfigs;
|
||||
}
|
||||
}
|
||||
|
||||
// Boilerplate
|
||||
factory SlotEntry.fromJson(Map<String, dynamic> json) => _$SlotEntryFromJson(json);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ SlotEntry _$SlotEntryFromJson(Map<String, dynamic> json) {
|
||||
..maxWeightConfigs = (json['max_weight_configs'] as List<dynamic>)
|
||||
.map((e) => BaseConfig.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..setNrConfigs = (json['set_nr_configs'] as List<dynamic>)
|
||||
..nrOfSetsConfigs = (json['set_nr_configs'] as List<dynamic>)
|
||||
.map((e) => BaseConfig.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..rirConfigs = (json['rir_configs'] as List<dynamic>)
|
||||
@@ -71,7 +71,6 @@ SlotEntry _$SlotEntryFromJson(Map<String, dynamic> json) {
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$SlotEntryToJson(SlotEntry instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'slot': instance.slotId,
|
||||
'order': instance.order,
|
||||
'comment': instance.comment,
|
||||
@@ -85,7 +84,7 @@ Map<String, dynamic> _$SlotEntryToJson(SlotEntry instance) => <String, dynamic>{
|
||||
'weight_rounding': instance.weightRounding,
|
||||
'weight_configs': instance.weightConfigs,
|
||||
'max_weight_configs': instance.maxWeightConfigs,
|
||||
'set_nr_configs': instance.setNrConfigs,
|
||||
'set_nr_configs': instance.nrOfSetsConfigs,
|
||||
'rir_configs': instance.rirConfigs,
|
||||
'rest_configs': instance.restTimeConfigs,
|
||||
'max_rest_configs': instance.maxRestTimeConfigs,
|
||||
|
||||
@@ -52,7 +52,7 @@ class RoutinesProvider with ChangeNotifier {
|
||||
static const _weightUnitUrlPath = 'setting-weightunit';
|
||||
static const _repetitionUnitUrlPath = 'setting-repetitionunit';
|
||||
static const _routineConfigSets = 'sets-config';
|
||||
static const _routineConfigWeights = 'weights-config';
|
||||
static const _routineConfigWeights = 'weight-config';
|
||||
static const _routineConfigReps = 'reps-config';
|
||||
|
||||
Routine? _currentPlan;
|
||||
@@ -486,32 +486,64 @@ class RoutinesProvider with ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
String getConfigUrl(String type) {
|
||||
String getConfigUrl(ConfigType type) {
|
||||
switch (type) {
|
||||
case 'sets':
|
||||
case ConfigType.sets:
|
||||
return _routineConfigSets;
|
||||
case 'weights':
|
||||
case ConfigType.weight:
|
||||
return _routineConfigWeights;
|
||||
case 'reps':
|
||||
case ConfigType.reps:
|
||||
return _routineConfigReps;
|
||||
}
|
||||
throw const NoSuchEntryException();
|
||||
}
|
||||
|
||||
Future<void> editConfig(BaseConfig config, String type) async {
|
||||
await baseProvider.patch(
|
||||
Future<BaseConfig> editConfig(BaseConfig config, ConfigType type) async {
|
||||
final data = await baseProvider.patch(
|
||||
config.toJson(),
|
||||
baseProvider.makeUrl(getConfigUrl(type), id: config.id),
|
||||
);
|
||||
|
||||
notifyListeners();
|
||||
return BaseConfig.fromJson(data);
|
||||
}
|
||||
|
||||
Future<void> addConfig(BaseConfig config, String type) async {
|
||||
await baseProvider.post(
|
||||
Future<BaseConfig> addConfig(BaseConfig config, ConfigType type) async {
|
||||
final data = await baseProvider.post(
|
||||
config.toJson(),
|
||||
baseProvider.makeUrl(getConfigUrl(type)),
|
||||
);
|
||||
notifyListeners();
|
||||
return BaseConfig.fromJson(data);
|
||||
}
|
||||
|
||||
Future<void> deleteConfig(int id, ConfigType type) async {
|
||||
await baseProvider.deleteRequest(getConfigUrl(type), id);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> handleConfig(SlotEntry entry, String input, ConfigType type) async {
|
||||
final configs = entry.getConfigsByType(type);
|
||||
final config = configs.isNotEmpty ? configs.first : null;
|
||||
final value = input.isNotEmpty ? num.parse(input) : null;
|
||||
|
||||
if (value == null && config != null) {
|
||||
// Value removed, delete entry
|
||||
configs.removeWhere((c) => c.id! == config.id!);
|
||||
await deleteConfig(config.id!, type);
|
||||
} else if (config != null) {
|
||||
// Update existing value
|
||||
configs.first.value = value!;
|
||||
await editConfig(configs.first, type);
|
||||
} else if (value != null && config == null) {
|
||||
// Create new config
|
||||
configs.add(
|
||||
await addConfig(
|
||||
BaseConfig.firstIteration(value, entry.id!),
|
||||
type,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> fetchComputedSettings(Slot workoutSet) async {
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
@@ -41,8 +39,8 @@ class SlotEntryForm extends StatelessWidget {
|
||||
final repsController = TextEditingController();
|
||||
|
||||
SlotEntryForm(this.entry, {super.key}) {
|
||||
if (entry.setNrConfigs.isNotEmpty) {
|
||||
setsController.text = entry.setNrConfigs.first.value.toString();
|
||||
if (entry.nrOfSetsConfigs.isNotEmpty) {
|
||||
setsController.text = entry.nrOfSetsConfigs.first.value.toString();
|
||||
}
|
||||
if (entry.weightConfigs.isNotEmpty) {
|
||||
weightController.text = entry.weightConfigs.first.value.toString();
|
||||
@@ -83,42 +81,18 @@ class SlotEntryForm extends StatelessWidget {
|
||||
OutlinedButton(
|
||||
key: const Key(SUBMIT_BUTTON_KEY_NAME),
|
||||
child: Text(AppLocalizations.of(context).save),
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
if (!_form.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
_form.currentState!.save();
|
||||
|
||||
final provider = Provider.of<RoutinesProvider>(context, listen: false);
|
||||
if (weightController.text.isNotEmpty) {
|
||||
log('process weight...');
|
||||
if (entry.weightConfigs.isNotEmpty) {
|
||||
log('update first config');
|
||||
entry.weightConfigs.first.value = num.parse(weightController.text);
|
||||
provider.editConfig(entry.weightConfigs.first, 'weights');
|
||||
} else {
|
||||
log('creating config');
|
||||
}
|
||||
}
|
||||
|
||||
if (setsController.text.isNotEmpty) {
|
||||
log('process sets...');
|
||||
if (entry.setNrConfigs.isNotEmpty) {
|
||||
entry.setNrConfigs.first.value = num.parse(setsController.text);
|
||||
provider.editConfig(entry.setNrConfigs.first, 'sets');
|
||||
} else {
|
||||
log('creating config');
|
||||
}
|
||||
}
|
||||
if (repsController.text.isNotEmpty) {
|
||||
log('process reps...');
|
||||
if (entry.repsConfigs.isNotEmpty) {
|
||||
entry.repsConfigs.first.value = num.parse(repsController.text);
|
||||
provider.editConfig(entry.repsConfigs.first, 'reps');
|
||||
} else {
|
||||
log('creating config');
|
||||
}
|
||||
}
|
||||
// Process new, edited or entries to be deleted
|
||||
provider.handleConfig(entry, weightController.text, ConfigType.weight);
|
||||
provider.handleConfig(entry, setsController.text, ConfigType.sets);
|
||||
provider.handleConfig(entry, repsController.text, ConfigType.reps);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
|
||||
89
pubspec.lock
89
pubspec.lock
@@ -5,18 +5,23 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
|
||||
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "67.0.0"
|
||||
version: "72.0.0"
|
||||
_macros:
|
||||
dependency: transitive
|
||||
description: dart
|
||||
source: sdk
|
||||
version: "0.3.2"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
|
||||
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.4.1"
|
||||
version: "6.7.0"
|
||||
analyzer_plugin:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -149,10 +154,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: camera_avfoundation
|
||||
sha256: "0d04cec8715b59fb6dc60eefb47e69024f51233c570e475b886dc9290568bca7"
|
||||
sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.17+4"
|
||||
version: "0.9.17+5"
|
||||
camera_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -293,10 +298,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_style
|
||||
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
|
||||
sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.6"
|
||||
version: "2.3.7"
|
||||
drift:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -349,10 +354,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file_selector_linux
|
||||
sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2"
|
||||
sha256: b2b91daf8a68ecfa4a01b778a6f52edef9b14ecd506e771488ea0f2e0784198b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.3"
|
||||
version: "0.9.3+1"
|
||||
file_selector_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -397,10 +402,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flex_color_scheme
|
||||
sha256: "03fd5e68eff346a042026577f54be0cd4507e565cd86390b12c0aca1c5d6cb0b"
|
||||
sha256: ad9695ebdf7e2709b0311cac6a8f887984666e56884eecafa008d236ec3fc0c7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.0.0"
|
||||
version: "8.0.1"
|
||||
flex_seed_scheme:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -524,10 +529,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_svg
|
||||
sha256: "1b7723a814d84fb65869ea7115cdb3ee7c3be5a27a755c1ec60e049f6b9fcbb2"
|
||||
sha256: "578bd8c508144fdaffd4f77b8ef2d8c523602275cd697cc3db284dbd762ef4ce"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.11"
|
||||
version: "2.0.14"
|
||||
flutter_svg_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -566,18 +571,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: font_awesome_flutter
|
||||
sha256: "275ff26905134bcb59417cf60ad979136f1f8257f2f449914b2c3e05bbb4cd6f"
|
||||
sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.7.0"
|
||||
version: "10.8.0"
|
||||
freezed:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: freezed
|
||||
sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
|
||||
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.2"
|
||||
version: "2.5.7"
|
||||
freezed_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -828,6 +833,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
macros:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: macros
|
||||
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.2-main.4"
|
||||
markdown:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -920,10 +933,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
sha256: df3eb3e0aed5c1107bb0fdb80a8e82e778114958b1c5ac5644fb1ac9cae8a998
|
||||
sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.1.0"
|
||||
version: "8.1.1"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -944,18 +957,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_parsing
|
||||
sha256: "45f7d6bba1128761de5540f39d5ca000ea8a1f22f06b76b61094a60a2997bd0e"
|
||||
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.1.0"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path_provider
|
||||
sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378
|
||||
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.1.5"
|
||||
path_provider_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1128,10 +1141,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051"
|
||||
sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
version: "2.3.3"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1349,10 +1362,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: "0dea215895a4d254401730ca0ba8204b29109a34a99fb06ae559a2b60988d2de"
|
||||
sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.13"
|
||||
version: "6.3.14"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1365,10 +1378,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af
|
||||
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "3.2.1"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1405,26 +1418,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_graphics
|
||||
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
|
||||
sha256: "773c9522d66d523e1c7b25dfb95cc91c26a1e17b107039cfe147285e92de7878"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.11+1"
|
||||
version: "1.1.14"
|
||||
vector_graphics_codec:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_graphics_codec
|
||||
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
|
||||
sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.11+1"
|
||||
version: "1.1.12"
|
||||
vector_graphics_compiler:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_graphics_compiler
|
||||
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
|
||||
sha256: ab9ff38fc771e9ee1139320adbe3d18a60327370c218c60752068ebee4b49ab1
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.11+1"
|
||||
version: "1.1.15"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1541,10 +1554,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: "10169d3934549017f0ae278ccb07f828f9d6ea21573bab0fb77b0e1ef0fce454"
|
||||
sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.7.2"
|
||||
version: "5.8.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -3,22 +3,24 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i15;
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i8;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/log.dart' as _i10;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i9;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i9;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -93,8 +95,8 @@ class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
_FakeSlotEntry_6(
|
||||
class _FakeBaseConfig_6 extends _i1.SmartFake implements _i8.BaseConfig {
|
||||
_FakeBaseConfig_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -103,8 +105,8 @@ class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
class _FakeSlotEntry_7 extends _i1.SmartFake implements _i9.SlotEntry {
|
||||
_FakeSlotEntry_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -113,8 +115,18 @@ class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
_FakeLog_8(
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -126,7 +138,7 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -243,27 +255,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllRoutinesFull,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void setExercisesAndUnits(List<_i13.DayData>? entries) => super.noSuchMethod(
|
||||
void setExercisesAndUnits(List<_i14.DayData>? entries) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -272,74 +284,74 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRoutine,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i13.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i5.Routine? workout,
|
||||
_i14.Exercise? base,
|
||||
_i15.Exercise? base,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -349,41 +361,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
returnValue: _i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i6.Day> addDay(
|
||||
_i13.Future<_i6.Day> addDay(
|
||||
_i6.Day? day, {
|
||||
dynamic refresh = false,
|
||||
}) =>
|
||||
@@ -393,7 +405,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
[day],
|
||||
{#refresh: refresh},
|
||||
),
|
||||
returnValue: _i12.Future<_i6.Day>.value(_FakeDay_4(
|
||||
returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addDay,
|
||||
@@ -401,158 +413,259 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
{#refresh: refresh},
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i6.Day>);
|
||||
) as _i13.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
_i13.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDays,
|
||||
[days],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[dayId],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
returnValue: _i12.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i7.Slot>);
|
||||
) as _i13.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
_i13.Future<void> editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlot,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<List<_i7.Slot>> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlots,
|
||||
[slots],
|
||||
),
|
||||
returnValue: _i12.Future<List<_i7.Slot>>.value(<_i7.Slot>[]),
|
||||
) as _i12.Future<List<_i7.Slot>>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
String getConfigUrl(_i9.ConfigType? type) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
),
|
||||
) as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.BaseConfig> editConfig(
|
||||
_i8.BaseConfig? config,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.BaseConfig>.value(_FakeBaseConfig_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.BaseConfig> addConfig(
|
||||
_i8.BaseConfig? config,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.BaseConfig>.value(_FakeBaseConfig_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(
|
||||
int? id,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteConfig,
|
||||
[
|
||||
id,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<dynamic> handleConfig(
|
||||
_i9.SlotEntry? entry,
|
||||
String? input,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#handleConfig,
|
||||
[
|
||||
entry,
|
||||
input,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchComputedSettings(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[setId],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i8.SlotEntry> addSetting(_i8.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
_i13.Future<_i9.SlotEntry> addSetting(_i9.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6(
|
||||
returnValue: _i13.Future<_i9.SlotEntry>.value(_FakeSlotEntry_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i8.SlotEntry>);
|
||||
) as _i13.Future<_i9.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i12.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
_i13.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i9.WorkoutSession>);
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i10.Log> addLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i12.Future<_i10.Log>.value(_FakeLog_8(
|
||||
returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i10.Log>);
|
||||
) as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
@@ -561,7 +674,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
||||
@@ -3,22 +3,24 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i15;
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i8;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/log.dart' as _i10;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i9;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i9;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -93,8 +95,8 @@ class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
_FakeSlotEntry_6(
|
||||
class _FakeBaseConfig_6 extends _i1.SmartFake implements _i8.BaseConfig {
|
||||
_FakeBaseConfig_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -103,8 +105,8 @@ class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
class _FakeSlotEntry_7 extends _i1.SmartFake implements _i9.SlotEntry {
|
||||
_FakeSlotEntry_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -113,8 +115,18 @@ class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
_FakeLog_8(
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -126,7 +138,7 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -243,27 +255,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllRoutinesFull,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void setExercisesAndUnits(List<_i13.DayData>? entries) => super.noSuchMethod(
|
||||
void setExercisesAndUnits(List<_i14.DayData>? entries) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -272,74 +284,74 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRoutine,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i13.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i5.Routine? workout,
|
||||
_i14.Exercise? base,
|
||||
_i15.Exercise? base,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -349,41 +361,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
returnValue: _i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i6.Day> addDay(
|
||||
_i13.Future<_i6.Day> addDay(
|
||||
_i6.Day? day, {
|
||||
dynamic refresh = false,
|
||||
}) =>
|
||||
@@ -393,7 +405,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
[day],
|
||||
{#refresh: refresh},
|
||||
),
|
||||
returnValue: _i12.Future<_i6.Day>.value(_FakeDay_4(
|
||||
returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addDay,
|
||||
@@ -401,158 +413,259 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
{#refresh: refresh},
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i6.Day>);
|
||||
) as _i13.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
_i13.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDays,
|
||||
[days],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[dayId],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
returnValue: _i12.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i7.Slot>);
|
||||
) as _i13.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
_i13.Future<void> editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlot,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<List<_i7.Slot>> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlots,
|
||||
[slots],
|
||||
),
|
||||
returnValue: _i12.Future<List<_i7.Slot>>.value(<_i7.Slot>[]),
|
||||
) as _i12.Future<List<_i7.Slot>>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
String getConfigUrl(_i9.ConfigType? type) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
),
|
||||
) as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.BaseConfig> editConfig(
|
||||
_i8.BaseConfig? config,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.BaseConfig>.value(_FakeBaseConfig_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.BaseConfig> addConfig(
|
||||
_i8.BaseConfig? config,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.BaseConfig>.value(_FakeBaseConfig_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(
|
||||
int? id,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteConfig,
|
||||
[
|
||||
id,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<dynamic> handleConfig(
|
||||
_i9.SlotEntry? entry,
|
||||
String? input,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#handleConfig,
|
||||
[
|
||||
entry,
|
||||
input,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchComputedSettings(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[setId],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i8.SlotEntry> addSetting(_i8.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
_i13.Future<_i9.SlotEntry> addSetting(_i9.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6(
|
||||
returnValue: _i13.Future<_i9.SlotEntry>.value(_FakeSlotEntry_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i8.SlotEntry>);
|
||||
) as _i13.Future<_i9.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i12.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
_i13.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i9.WorkoutSession>);
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i10.Log> addLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i12.Future<_i10.Log>.value(_FakeLog_8(
|
||||
returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i10.Log>);
|
||||
) as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
@@ -561,7 +674,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
||||
@@ -3,22 +3,24 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i15;
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i8;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/log.dart' as _i10;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i9;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i9;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -93,8 +95,8 @@ class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
_FakeSlotEntry_6(
|
||||
class _FakeBaseConfig_6 extends _i1.SmartFake implements _i8.BaseConfig {
|
||||
_FakeBaseConfig_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -103,8 +105,8 @@ class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
class _FakeSlotEntry_7 extends _i1.SmartFake implements _i9.SlotEntry {
|
||||
_FakeSlotEntry_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -113,8 +115,18 @@ class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
_FakeLog_8(
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -126,7 +138,7 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -243,27 +255,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllRoutinesFull,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void setExercisesAndUnits(List<_i13.DayData>? entries) => super.noSuchMethod(
|
||||
void setExercisesAndUnits(List<_i14.DayData>? entries) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -272,74 +284,74 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i12.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i5.Routine>);
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRoutine,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i13.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i5.Routine? workout,
|
||||
_i14.Exercise? base,
|
||||
_i15.Exercise? base,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -349,41 +361,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
returnValue: _i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
_i13.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i6.Day> addDay(
|
||||
_i13.Future<_i6.Day> addDay(
|
||||
_i6.Day? day, {
|
||||
dynamic refresh = false,
|
||||
}) =>
|
||||
@@ -393,7 +405,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
[day],
|
||||
{#refresh: refresh},
|
||||
),
|
||||
returnValue: _i12.Future<_i6.Day>.value(_FakeDay_4(
|
||||
returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addDay,
|
||||
@@ -401,158 +413,259 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
{#refresh: refresh},
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i6.Day>);
|
||||
) as _i13.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
_i13.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDays,
|
||||
[days],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[dayId],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
returnValue: _i12.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i7.Slot>);
|
||||
) as _i13.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
_i13.Future<void> editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlot,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<List<_i7.Slot>> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlots,
|
||||
[slots],
|
||||
),
|
||||
returnValue: _i12.Future<List<_i7.Slot>>.value(<_i7.Slot>[]),
|
||||
) as _i12.Future<List<_i7.Slot>>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
String getConfigUrl(_i9.ConfigType? type) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
),
|
||||
) as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.BaseConfig> editConfig(
|
||||
_i8.BaseConfig? config,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.BaseConfig>.value(_FakeBaseConfig_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.BaseConfig> addConfig(
|
||||
_i8.BaseConfig? config,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.BaseConfig>.value(_FakeBaseConfig_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(
|
||||
int? id,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteConfig,
|
||||
[
|
||||
id,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<dynamic> handleConfig(
|
||||
_i9.SlotEntry? entry,
|
||||
String? input,
|
||||
_i9.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#handleConfig,
|
||||
[
|
||||
entry,
|
||||
input,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchComputedSettings(_i7.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[setId],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i8.SlotEntry> addSetting(_i8.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
_i13.Future<_i9.SlotEntry> addSetting(_i9.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6(
|
||||
returnValue: _i13.Future<_i9.SlotEntry>.value(_FakeSlotEntry_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i8.SlotEntry>);
|
||||
) as _i13.Future<_i9.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i12.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
_i13.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i9.WorkoutSession>);
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i12.Future<_i10.Log> addLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i12.Future<_i10.Log>.value(_FakeLog_8(
|
||||
returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
)),
|
||||
) as _i12.Future<_i10.Log>);
|
||||
) as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
_i13.Future<void> deleteLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
@@ -561,7 +674,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
||||
@@ -3,30 +3,32 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i20;
|
||||
import 'dart:ui' as _i21;
|
||||
import 'dart:async' as _i21;
|
||||
import 'dart:ui' as _i22;
|
||||
|
||||
import 'package:http/http.dart' as _i10;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i25;
|
||||
import 'package:wger/database/exercises/exercise_database.dart' as _i3;
|
||||
import 'package:wger/models/exercises/category.dart' as _i5;
|
||||
import 'package:wger/models/exercises/equipment.dart' as _i6;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i4;
|
||||
import 'package:wger/models/exercises/language.dart' as _i8;
|
||||
import 'package:wger/models/exercises/muscle.dart' as _i7;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i16;
|
||||
import 'package:wger/models/workouts/day.dart' as _i14;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i23;
|
||||
import 'package:wger/models/workouts/log.dart' as _i18;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i24;
|
||||
import 'package:wger/models/workouts/log.dart' as _i19;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i12;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i13;
|
||||
import 'package:wger/models/workouts/session.dart' as _i17;
|
||||
import 'package:wger/models/workouts/session.dart' as _i18;
|
||||
import 'package:wger/models/workouts/slot.dart' as _i15;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i16;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i17;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i11;
|
||||
import 'package:wger/providers/auth.dart' as _i9;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/exercises.dart' as _i19;
|
||||
import 'package:wger/providers/routines.dart' as _i22;
|
||||
import 'package:wger/providers/exercises.dart' as _i20;
|
||||
import 'package:wger/providers/routines.dart' as _i23;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -201,8 +203,8 @@ class _FakeSlot_15 extends _i1.SmartFake implements _i15.Slot {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSlotEntry_16 extends _i1.SmartFake implements _i16.SlotEntry {
|
||||
_FakeSlotEntry_16(
|
||||
class _FakeBaseConfig_16 extends _i1.SmartFake implements _i16.BaseConfig {
|
||||
_FakeBaseConfig_16(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -211,8 +213,8 @@ class _FakeSlotEntry_16 extends _i1.SmartFake implements _i16.SlotEntry {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_17 extends _i1.SmartFake implements _i17.WorkoutSession {
|
||||
_FakeWorkoutSession_17(
|
||||
class _FakeSlotEntry_17 extends _i1.SmartFake implements _i17.SlotEntry {
|
||||
_FakeSlotEntry_17(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -221,8 +223,18 @@ class _FakeWorkoutSession_17 extends _i1.SmartFake implements _i17.WorkoutSessio
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_18 extends _i1.SmartFake implements _i18.Log {
|
||||
_FakeLog_18(
|
||||
class _FakeWorkoutSession_18 extends _i1.SmartFake implements _i18.WorkoutSession {
|
||||
_FakeWorkoutSession_18(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_19 extends _i1.SmartFake implements _i19.Log {
|
||||
_FakeLog_19(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
@@ -234,7 +246,7 @@ class _FakeLog_18 extends _i1.SmartFake implements _i18.Log {
|
||||
/// A class which mocks [ExercisesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
MockExercisesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -342,14 +354,14 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
) as bool);
|
||||
|
||||
@override
|
||||
_i20.Future<void> setFilters(_i19.Filters? newFilters) => (super.noSuchMethod(
|
||||
_i21.Future<void> setFilters(_i20.Filters? newFilters) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setFilters,
|
||||
[newFilters],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
void initFilters() => super.noSuchMethod(
|
||||
@@ -361,14 +373,14 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i20.Future<void> findByFilters() => (super.noSuchMethod(
|
||||
_i21.Future<void> findByFilters() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findByFilters,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
@@ -469,56 +481,56 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
) as _i8.Language);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetCategoriesFromApi() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetCategoriesFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategoriesFromApi,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetMusclesFromApi() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetMusclesFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMusclesFromApi,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetEquipmentsFromApi() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetEquipmentsFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipmentsFromApi,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetLanguagesFromApi() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetLanguagesFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguagesFromApi,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
_i21.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
),
|
||||
returnValue: _i20.Future<_i4.Exercise?>.value(),
|
||||
) as _i20.Future<_i4.Exercise?>);
|
||||
returnValue: _i21.Future<_i4.Exercise?>.value(),
|
||||
) as _i21.Future<_i4.Exercise?>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i4.Exercise> handleUpdateExerciseFromApi(
|
||||
_i21.Future<_i4.Exercise> handleUpdateExerciseFromApi(
|
||||
_i3.ExerciseDatabase? database,
|
||||
int? exerciseId,
|
||||
) =>
|
||||
@@ -530,7 +542,7 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
exerciseId,
|
||||
],
|
||||
),
|
||||
returnValue: _i20.Future<_i4.Exercise>.value(_FakeExercise_2(
|
||||
returnValue: _i21.Future<_i4.Exercise>.value(_FakeExercise_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#handleUpdateExerciseFromApi,
|
||||
@@ -540,41 +552,41 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i4.Exercise>);
|
||||
) as _i21.Future<_i4.Exercise>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
_i21.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
{#forceInit: forceInit},
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> clearAllCachesAndPrefs() => (super.noSuchMethod(
|
||||
_i21.Future<void> clearAllCachesAndPrefs() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearAllCachesAndPrefs,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetInitialData() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetInitialData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetInitialData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> setExercisesFromDatabase(
|
||||
_i21.Future<void> setExercisesFromDatabase(
|
||||
_i3.ExerciseDatabase? database, {
|
||||
bool? forceDeleteCache = false,
|
||||
}) =>
|
||||
@@ -584,52 +596,52 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
[database],
|
||||
{#forceDeleteCache: forceDeleteCache},
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<List<_i4.Exercise>> searchExercise(
|
||||
_i21.Future<List<_i4.Exercise>> searchExercise(
|
||||
String? name, {
|
||||
String? languageCode = r'en',
|
||||
bool? searchEnglish = false,
|
||||
@@ -643,11 +655,11 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
),
|
||||
returnValue: _i20.Future<List<_i4.Exercise>>.value(<_i4.Exercise>[]),
|
||||
) as _i20.Future<List<_i4.Exercise>>);
|
||||
returnValue: _i21.Future<List<_i4.Exercise>>.value(<_i4.Exercise>[]),
|
||||
) as _i21.Future<List<_i4.Exercise>>);
|
||||
|
||||
@override
|
||||
void addListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
@@ -656,7 +668,7 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
@@ -769,25 +781,25 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
) as Uri);
|
||||
|
||||
@override
|
||||
_i20.Future<dynamic> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
_i21.Future<dynamic> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i20.Future<dynamic>.value(),
|
||||
) as _i20.Future<dynamic>);
|
||||
returnValue: _i21.Future<dynamic>.value(),
|
||||
) as _i21.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i20.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
_i21.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i20.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i20.Future<List<dynamic>>);
|
||||
returnValue: _i21.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i21.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> post(
|
||||
_i21.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
@@ -799,11 +811,11 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i20.Future<Map<String, dynamic>>);
|
||||
returnValue: _i21.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i21.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> patch(
|
||||
_i21.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
@@ -815,11 +827,11 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i20.Future<Map<String, dynamic>>);
|
||||
returnValue: _i21.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i21.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i10.Response> deleteRequest(
|
||||
_i21.Future<_i10.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
@@ -831,7 +843,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
id,
|
||||
],
|
||||
),
|
||||
returnValue: _i20.Future<_i10.Response>.value(_FakeResponse_10(
|
||||
returnValue: _i21.Future<_i10.Response>.value(_FakeResponse_10(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
@@ -841,13 +853,13 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i10.Response>);
|
||||
) as _i21.Future<_i10.Response>);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -964,27 +976,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllRoutinesFull,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
void setExercisesAndUnits(List<_i23.DayData>? entries) => super.noSuchMethod(
|
||||
void setExercisesAndUnits(List<_i24.DayData>? entries) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -993,72 +1005,72 @@ class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i20.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i21.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13(
|
||||
returnValue: _i21.Future<_i13.Routine>.value(_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i13.Routine>);
|
||||
) as _i21.Future<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i21.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13(
|
||||
returnValue: _i21.Future<_i13.Routine>.value(_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i13.Routine>);
|
||||
) as _i21.Future<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i13.Routine> addRoutine(_i13.Routine? routine) => (super.noSuchMethod(
|
||||
_i21.Future<_i13.Routine> addRoutine(_i13.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13(
|
||||
returnValue: _i21.Future<_i13.Routine>.value(_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i13.Routine>);
|
||||
) as _i21.Future<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editRoutine(_i13.Routine? routine) => (super.noSuchMethod(
|
||||
_i21.Future<void> editRoutine(_i13.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
_i21.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRoutine,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i21.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i13.Routine? workout,
|
||||
_i4.Exercise? base,
|
||||
) =>
|
||||
@@ -1070,41 +1082,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i20.Future<Map<String, dynamic>>);
|
||||
returnValue: _i21.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i21.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
_i21.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i14.Day> addDay(
|
||||
_i21.Future<_i14.Day> addDay(
|
||||
_i14.Day? day, {
|
||||
dynamic refresh = false,
|
||||
}) =>
|
||||
@@ -1114,7 +1126,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
[day],
|
||||
{#refresh: refresh},
|
||||
),
|
||||
returnValue: _i20.Future<_i14.Day>.value(_FakeDay_14(
|
||||
returnValue: _i21.Future<_i14.Day>.value(_FakeDay_14(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addDay,
|
||||
@@ -1122,158 +1134,259 @@ class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
{#refresh: refresh},
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i14.Day>);
|
||||
) as _i21.Future<_i14.Day>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editDay(_i14.Day? day) => (super.noSuchMethod(
|
||||
_i21.Future<void> editDay(_i14.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editDays(List<_i14.Day>? days) => (super.noSuchMethod(
|
||||
_i21.Future<void> editDays(List<_i14.Day>? days) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDays,
|
||||
[days],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
_i21.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[dayId],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i15.Slot> addSlot(_i15.Slot? slot) => (super.noSuchMethod(
|
||||
_i21.Future<_i15.Slot> addSlot(_i15.Slot? slot) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
returnValue: _i20.Future<_i15.Slot>.value(_FakeSlot_15(
|
||||
returnValue: _i21.Future<_i15.Slot>.value(_FakeSlot_15(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i15.Slot>);
|
||||
) as _i21.Future<_i15.Slot>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editSlot(_i15.Slot? workoutSet) => (super.noSuchMethod(
|
||||
_i21.Future<void> editSlot(_i15.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlot,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<List<_i15.Slot>> editSlots(List<_i15.Slot>? slots) => (super.noSuchMethod(
|
||||
_i21.Future<void> editSlots(List<_i15.Slot>? slots) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlots,
|
||||
[slots],
|
||||
),
|
||||
returnValue: _i20.Future<List<_i15.Slot>>.value(<_i15.Slot>[]),
|
||||
) as _i20.Future<List<_i15.Slot>>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchComputedSettings(_i15.Slot? workoutSet) => (super.noSuchMethod(
|
||||
String getConfigUrl(_i17.ConfigType? type) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
returnValue: _i25.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
),
|
||||
) as String);
|
||||
|
||||
@override
|
||||
_i21.Future<_i16.BaseConfig> editConfig(
|
||||
_i16.BaseConfig? config,
|
||||
_i17.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i21.Future<_i16.BaseConfig>.value(_FakeBaseConfig_16(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i21.Future<_i16.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i21.Future<_i16.BaseConfig> addConfig(
|
||||
_i16.BaseConfig? config,
|
||||
_i17.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i21.Future<_i16.BaseConfig>.value(_FakeBaseConfig_16(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i21.Future<_i16.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i21.Future<void> deleteConfig(
|
||||
int? id,
|
||||
_i17.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteConfig,
|
||||
[
|
||||
id,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i21.Future<dynamic> handleConfig(
|
||||
_i17.SlotEntry? entry,
|
||||
String? input,
|
||||
_i17.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#handleConfig,
|
||||
[
|
||||
entry,
|
||||
input,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i21.Future<dynamic>.value(),
|
||||
) as _i21.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i21.Future<void> fetchComputedSettings(_i15.Slot? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
_i21.Future<void> deleteSet(int? setId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[setId],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i16.SlotEntry> addSetting(_i16.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
_i21.Future<_i17.SlotEntry> addSetting(_i17.SlotEntry? workoutSetting) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
returnValue: _i20.Future<_i16.SlotEntry>.value(_FakeSlotEntry_16(
|
||||
returnValue: _i21.Future<_i17.SlotEntry>.value(_FakeSlotEntry_17(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i16.SlotEntry>);
|
||||
) as _i21.Future<_i17.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i20.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
_i21.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i20.Future<dynamic>.value(),
|
||||
) as _i20.Future<dynamic>);
|
||||
returnValue: _i21.Future<dynamic>.value(),
|
||||
) as _i21.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i17.WorkoutSession> addSession(_i17.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i21.Future<_i18.WorkoutSession> addSession(_i18.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i20.Future<_i17.WorkoutSession>.value(_FakeWorkoutSession_17(
|
||||
returnValue: _i21.Future<_i18.WorkoutSession>.value(_FakeWorkoutSession_18(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i17.WorkoutSession>);
|
||||
) as _i21.Future<_i18.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i18.Log> addLog(_i18.Log? log) => (super.noSuchMethod(
|
||||
_i21.Future<_i19.Log> addLog(_i19.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i20.Future<_i18.Log>.value(_FakeLog_18(
|
||||
returnValue: _i21.Future<_i19.Log>.value(_FakeLog_19(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
)),
|
||||
) as _i20.Future<_i18.Log>);
|
||||
) as _i21.Future<_i19.Log>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteLog(_i18.Log? log) => (super.noSuchMethod(
|
||||
_i21.Future<void> deleteLog(_i19.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
) as _i20.Future<void>);
|
||||
returnValue: _i21.Future<void>.value(),
|
||||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
@@ -1282,7 +1395,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
||||
Reference in New Issue
Block a user