mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
dart format --line-length=100 .
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,24 +3,20 @@
|
||||
part of 'ingredients_database.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
class $IngredientsTable extends Ingredients
|
||||
with TableInfo<$IngredientsTable, IngredientTable> {
|
||||
class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, IngredientTable> {
|
||||
@override
|
||||
final GeneratedDatabase attachedDatabase;
|
||||
final String? _alias;
|
||||
$IngredientsTable(this.attachedDatabase, [this._alias]);
|
||||
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
||||
@override
|
||||
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
||||
'id', aliasedName, false,
|
||||
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
|
||||
type: DriftSqlType.int, requiredDuringInsert: true);
|
||||
static const VerificationMeta _dataMeta = const VerificationMeta('data');
|
||||
@override
|
||||
late final GeneratedColumn<String> data = GeneratedColumn<String>(
|
||||
'data', aliasedName, false,
|
||||
late final GeneratedColumn<String> data = GeneratedColumn<String>('data', aliasedName, false,
|
||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||
static const VerificationMeta _lastFetchedMeta =
|
||||
const VerificationMeta('lastFetched');
|
||||
static const VerificationMeta _lastFetchedMeta = const VerificationMeta('lastFetched');
|
||||
@override
|
||||
late final GeneratedColumn<DateTime> lastFetched = GeneratedColumn<DateTime>(
|
||||
'last_fetched', aliasedName, false,
|
||||
@@ -43,16 +39,13 @@ class $IngredientsTable extends Ingredients
|
||||
context.missing(_idMeta);
|
||||
}
|
||||
if (data.containsKey('data')) {
|
||||
context.handle(
|
||||
_dataMeta, this.data.isAcceptableOrUnknown(data['data']!, _dataMeta));
|
||||
context.handle(_dataMeta, this.data.isAcceptableOrUnknown(data['data']!, _dataMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_dataMeta);
|
||||
}
|
||||
if (data.containsKey('last_fetched')) {
|
||||
context.handle(
|
||||
_lastFetchedMeta,
|
||||
lastFetched.isAcceptableOrUnknown(
|
||||
data['last_fetched']!, _lastFetchedMeta));
|
||||
context.handle(_lastFetchedMeta,
|
||||
lastFetched.isAcceptableOrUnknown(data['last_fetched']!, _lastFetchedMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_lastFetchedMeta);
|
||||
}
|
||||
@@ -65,10 +58,8 @@ class $IngredientsTable extends Ingredients
|
||||
IngredientTable map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return IngredientTable(
|
||||
id: attachedDatabase.typeMapping
|
||||
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
|
||||
data: attachedDatabase.typeMapping
|
||||
.read(DriftSqlType.string, data['${effectivePrefix}data'])!,
|
||||
id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
|
||||
data: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!,
|
||||
lastFetched: attachedDatabase.typeMapping
|
||||
.read(DriftSqlType.dateTime, data['${effectivePrefix}last_fetched'])!,
|
||||
);
|
||||
@@ -86,8 +77,7 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
|
||||
|
||||
/// The date when the ingredient was last fetched from the server
|
||||
final DateTime lastFetched;
|
||||
const IngredientTable(
|
||||
{required this.id, required this.data, required this.lastFetched});
|
||||
const IngredientTable({required this.id, required this.data, required this.lastFetched});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
@@ -105,8 +95,7 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
|
||||
);
|
||||
}
|
||||
|
||||
factory IngredientTable.fromJson(Map<String, dynamic> json,
|
||||
{ValueSerializer? serializer}) {
|
||||
factory IngredientTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return IngredientTable(
|
||||
id: serializer.fromJson<int>(json['id']),
|
||||
@@ -124,8 +113,7 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
|
||||
};
|
||||
}
|
||||
|
||||
IngredientTable copyWith({int? id, String? data, DateTime? lastFetched}) =>
|
||||
IngredientTable(
|
||||
IngredientTable copyWith({int? id, String? data, DateTime? lastFetched}) => IngredientTable(
|
||||
id: id ?? this.id,
|
||||
data: data ?? this.data,
|
||||
lastFetched: lastFetched ?? this.lastFetched,
|
||||
@@ -134,8 +122,7 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
|
||||
return IngredientTable(
|
||||
id: data.id.present ? data.id.value : this.id,
|
||||
data: data.data.present ? data.data.value : this.data,
|
||||
lastFetched:
|
||||
data.lastFetched.present ? data.lastFetched.value : this.lastFetched,
|
||||
lastFetched: data.lastFetched.present ? data.lastFetched.value : this.lastFetched,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -194,10 +181,7 @@ class IngredientsCompanion extends UpdateCompanion<IngredientTable> {
|
||||
}
|
||||
|
||||
IngredientsCompanion copyWith(
|
||||
{Value<int>? id,
|
||||
Value<String>? data,
|
||||
Value<DateTime>? lastFetched,
|
||||
Value<int>? rowid}) {
|
||||
{Value<int>? id, Value<String>? data, Value<DateTime>? lastFetched, Value<int>? rowid}) {
|
||||
return IngredientsCompanion(
|
||||
id: id ?? this.id,
|
||||
data: data ?? this.data,
|
||||
@@ -247,23 +231,20 @@ abstract class _$IngredientDatabase extends GeneratedDatabase {
|
||||
List<DatabaseSchemaEntity> get allSchemaEntities => [ingredients];
|
||||
}
|
||||
|
||||
typedef $$IngredientsTableCreateCompanionBuilder = IngredientsCompanion
|
||||
Function({
|
||||
typedef $$IngredientsTableCreateCompanionBuilder = IngredientsCompanion Function({
|
||||
required int id,
|
||||
required String data,
|
||||
required DateTime lastFetched,
|
||||
Value<int> rowid,
|
||||
});
|
||||
typedef $$IngredientsTableUpdateCompanionBuilder = IngredientsCompanion
|
||||
Function({
|
||||
typedef $$IngredientsTableUpdateCompanionBuilder = IngredientsCompanion Function({
|
||||
Value<int> id,
|
||||
Value<String> data,
|
||||
Value<DateTime> lastFetched,
|
||||
Value<int> rowid,
|
||||
});
|
||||
|
||||
class $$IngredientsTableFilterComposer
|
||||
extends Composer<_$IngredientDatabase, $IngredientsTable> {
|
||||
class $$IngredientsTableFilterComposer extends Composer<_$IngredientDatabase, $IngredientsTable> {
|
||||
$$IngredientsTableFilterComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
@@ -271,18 +252,17 @@ class $$IngredientsTableFilterComposer
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
ColumnFilters<int> get id => $composableBuilder(
|
||||
column: $table.id, builder: (column) => ColumnFilters(column));
|
||||
ColumnFilters<int> get id =>
|
||||
$composableBuilder(column: $table.id, builder: (column) => ColumnFilters(column));
|
||||
|
||||
ColumnFilters<String> get data => $composableBuilder(
|
||||
column: $table.data, builder: (column) => ColumnFilters(column));
|
||||
ColumnFilters<String> get data =>
|
||||
$composableBuilder(column: $table.data, builder: (column) => ColumnFilters(column));
|
||||
|
||||
ColumnFilters<DateTime> get lastFetched => $composableBuilder(
|
||||
column: $table.lastFetched, builder: (column) => ColumnFilters(column));
|
||||
ColumnFilters<DateTime> get lastFetched =>
|
||||
$composableBuilder(column: $table.lastFetched, builder: (column) => ColumnFilters(column));
|
||||
}
|
||||
|
||||
class $$IngredientsTableOrderingComposer
|
||||
extends Composer<_$IngredientDatabase, $IngredientsTable> {
|
||||
class $$IngredientsTableOrderingComposer extends Composer<_$IngredientDatabase, $IngredientsTable> {
|
||||
$$IngredientsTableOrderingComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
@@ -290,14 +270,14 @@ class $$IngredientsTableOrderingComposer
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
ColumnOrderings<int> get id => $composableBuilder(
|
||||
column: $table.id, builder: (column) => ColumnOrderings(column));
|
||||
ColumnOrderings<int> get id =>
|
||||
$composableBuilder(column: $table.id, builder: (column) => ColumnOrderings(column));
|
||||
|
||||
ColumnOrderings<String> get data => $composableBuilder(
|
||||
column: $table.data, builder: (column) => ColumnOrderings(column));
|
||||
ColumnOrderings<String> get data =>
|
||||
$composableBuilder(column: $table.data, builder: (column) => ColumnOrderings(column));
|
||||
|
||||
ColumnOrderings<DateTime> get lastFetched => $composableBuilder(
|
||||
column: $table.lastFetched, builder: (column) => ColumnOrderings(column));
|
||||
ColumnOrderings<DateTime> get lastFetched =>
|
||||
$composableBuilder(column: $table.lastFetched, builder: (column) => ColumnOrderings(column));
|
||||
}
|
||||
|
||||
class $$IngredientsTableAnnotationComposer
|
||||
@@ -309,14 +289,13 @@ class $$IngredientsTableAnnotationComposer
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
GeneratedColumn<int> get id =>
|
||||
$composableBuilder(column: $table.id, builder: (column) => column);
|
||||
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get data =>
|
||||
$composableBuilder(column: $table.data, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<DateTime> get lastFetched => $composableBuilder(
|
||||
column: $table.lastFetched, builder: (column) => column);
|
||||
GeneratedColumn<DateTime> get lastFetched =>
|
||||
$composableBuilder(column: $table.lastFetched, builder: (column) => column);
|
||||
}
|
||||
|
||||
class $$IngredientsTableTableManager extends RootTableManager<
|
||||
@@ -328,21 +307,15 @@ class $$IngredientsTableTableManager extends RootTableManager<
|
||||
$$IngredientsTableAnnotationComposer,
|
||||
$$IngredientsTableCreateCompanionBuilder,
|
||||
$$IngredientsTableUpdateCompanionBuilder,
|
||||
(
|
||||
IngredientTable,
|
||||
BaseReferences<_$IngredientDatabase, $IngredientsTable, IngredientTable>
|
||||
),
|
||||
(IngredientTable, BaseReferences<_$IngredientDatabase, $IngredientsTable, IngredientTable>),
|
||||
IngredientTable,
|
||||
PrefetchHooks Function()> {
|
||||
$$IngredientsTableTableManager(
|
||||
_$IngredientDatabase db, $IngredientsTable table)
|
||||
$$IngredientsTableTableManager(_$IngredientDatabase db, $IngredientsTable table)
|
||||
: super(TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer: () =>
|
||||
$$IngredientsTableFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$$IngredientsTableOrderingComposer($db: db, $table: table),
|
||||
createFilteringComposer: () => $$IngredientsTableFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () => $$IngredientsTableOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$$IngredientsTableAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback: ({
|
||||
@@ -369,9 +342,8 @@ class $$IngredientsTableTableManager extends RootTableManager<
|
||||
lastFetched: lastFetched,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
withReferenceMapper: (p0) =>
|
||||
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
|
||||
prefetchHooksCallback: null,
|
||||
));
|
||||
}
|
||||
@@ -385,10 +357,7 @@ typedef $$IngredientsTableProcessedTableManager = ProcessedTableManager<
|
||||
$$IngredientsTableAnnotationComposer,
|
||||
$$IngredientsTableCreateCompanionBuilder,
|
||||
$$IngredientsTableUpdateCompanionBuilder,
|
||||
(
|
||||
IngredientTable,
|
||||
BaseReferences<_$IngredientDatabase, $IngredientsTable, IngredientTable>
|
||||
),
|
||||
(IngredientTable, BaseReferences<_$IngredientDatabase, $IngredientsTable, IngredientTable>),
|
||||
IngredientTable,
|
||||
PrefetchHooks Function()>;
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ WeightEntry _$WeightEntryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'weight': numToString(instance.weight),
|
||||
'date': dateToYYYYMMDD(instance.date),
|
||||
|
||||
@@ -17,8 +17,7 @@ ExerciseCategory _$ExerciseCategoryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -25,12 +25,8 @@ Exercise _$ExerciseFromJson(Map<String, dynamic> json) {
|
||||
return Exercise(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
uuid: json['uuid'] as String?,
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
lastUpdate: json['last_update'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_update'] as String),
|
||||
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
|
||||
lastUpdate: json['last_update'] == null ? null : DateTime.parse(json['last_update'] as String),
|
||||
lastUpdateGlobal: json['last_update_global'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_update_global'] as String),
|
||||
@@ -43,15 +39,10 @@ Exercise _$ExerciseFromJson(Map<String, dynamic> json) {
|
||||
: ExerciseCategory.fromJson(json['categories'] as Map<String, dynamic>),
|
||||
)
|
||||
..categoryId = (json['category'] as num).toInt()
|
||||
..musclesIds = (json['muscles'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList()
|
||||
..musclesSecondaryIds = (json['muscles_secondary'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList()
|
||||
..equipmentIds = (json['equipment'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList();
|
||||
..musclesIds = (json['muscles'] as List<dynamic>).map((e) => (e as num).toInt()).toList()
|
||||
..musclesSecondaryIds =
|
||||
(json['muscles_secondary'] as List<dynamic>).map((e) => (e as num).toInt()).toList()
|
||||
..equipmentIds = (json['equipment'] as List<dynamic>).map((e) => (e as num).toInt()).toList();
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseToJson(Exercise instance) => <String, dynamic>{
|
||||
@@ -65,7 +56,6 @@ Map<String, dynamic> _$ExerciseToJson(Exercise instance) => <String, dynamic>{
|
||||
'categories': instance.category?.toJson(),
|
||||
'muscles': instance.musclesIds,
|
||||
'muscles_secondary': instance.musclesSecondaryIds,
|
||||
'musclesSecondary':
|
||||
instance.musclesSecondary.map((e) => e.toJson()).toList(),
|
||||
'musclesSecondary': instance.musclesSecondary.map((e) => e.toJson()).toList(),
|
||||
'equipment': instance.equipmentIds,
|
||||
};
|
||||
|
||||
@@ -47,8 +47,7 @@ mixin _$ExerciseApiData {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExerciseApiDataCopyWith<ExerciseApiData> get copyWith =>
|
||||
_$ExerciseApiDataCopyWithImpl<ExerciseApiData>(
|
||||
this as ExerciseApiData, _$identity);
|
||||
_$ExerciseApiDataCopyWithImpl<ExerciseApiData>(this as ExerciseApiData, _$identity);
|
||||
|
||||
/// Serializes this ExerciseApiData to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
@@ -60,26 +59,20 @@ mixin _$ExerciseApiData {
|
||||
other is ExerciseApiData &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.uuid, uuid) || other.uuid == uuid) &&
|
||||
(identical(other.variationId, variationId) ||
|
||||
other.variationId == variationId) &&
|
||||
(identical(other.variationId, variationId) || other.variationId == variationId) &&
|
||||
(identical(other.created, created) || other.created == created) &&
|
||||
(identical(other.lastUpdate, lastUpdate) ||
|
||||
other.lastUpdate == lastUpdate) &&
|
||||
(identical(other.lastUpdate, lastUpdate) || other.lastUpdate == lastUpdate) &&
|
||||
(identical(other.lastUpdateGlobal, lastUpdateGlobal) ||
|
||||
other.lastUpdateGlobal == lastUpdateGlobal) &&
|
||||
(identical(other.category, category) ||
|
||||
other.category == category) &&
|
||||
(identical(other.category, category) || other.category == category) &&
|
||||
const DeepCollectionEquality().equals(other.muscles, muscles) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.musclesSecondary, musclesSecondary) &&
|
||||
const DeepCollectionEquality().equals(other.musclesSecondary, musclesSecondary) &&
|
||||
const DeepCollectionEquality().equals(other.equipment, equipment) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.translations, translations) &&
|
||||
const DeepCollectionEquality().equals(other.translations, translations) &&
|
||||
const DeepCollectionEquality().equals(other.images, images) &&
|
||||
const DeepCollectionEquality().equals(other.videos, videos) &&
|
||||
const DeepCollectionEquality().equals(other.authors, authors) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.authorsGlobal, authorsGlobal));
|
||||
const DeepCollectionEquality().equals(other.authorsGlobal, authorsGlobal));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -110,8 +103,7 @@ mixin _$ExerciseApiData {
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ExerciseApiDataCopyWith<$Res> {
|
||||
factory $ExerciseApiDataCopyWith(
|
||||
ExerciseApiData value, $Res Function(ExerciseApiData) _then) =
|
||||
factory $ExerciseApiDataCopyWith(ExerciseApiData value, $Res Function(ExerciseApiData) _then) =
|
||||
_$ExerciseApiDataCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -125,8 +117,7 @@ abstract mixin class $ExerciseApiDataCopyWith<$Res> {
|
||||
List<Muscle> muscles,
|
||||
@JsonKey(name: 'muscles_secondary') List<Muscle> musclesSecondary,
|
||||
List<Equipment> equipment,
|
||||
@JsonKey(name: 'translations', defaultValue: [])
|
||||
List<Translation> translations,
|
||||
@JsonKey(name: 'translations', defaultValue: []) List<Translation> translations,
|
||||
List<ExerciseImage> images,
|
||||
List<Video> videos,
|
||||
@JsonKey(name: 'author_history') List<String> authors,
|
||||
@@ -134,8 +125,7 @@ abstract mixin class $ExerciseApiDataCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ExerciseApiDataCopyWithImpl<$Res>
|
||||
implements $ExerciseApiDataCopyWith<$Res> {
|
||||
class _$ExerciseApiDataCopyWithImpl<$Res> implements $ExerciseApiDataCopyWith<$Res> {
|
||||
_$ExerciseApiDataCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ExerciseApiData _self;
|
||||
@@ -239,16 +229,14 @@ class _ExerciseBaseData implements ExerciseApiData {
|
||||
@JsonKey(name: 'last_update_global') required this.lastUpdateGlobal,
|
||||
required this.category,
|
||||
required final List<Muscle> muscles,
|
||||
@JsonKey(name: 'muscles_secondary')
|
||||
required final List<Muscle> musclesSecondary,
|
||||
@JsonKey(name: 'muscles_secondary') required final List<Muscle> musclesSecondary,
|
||||
required final List<Equipment> equipment,
|
||||
@JsonKey(name: 'translations', defaultValue: [])
|
||||
required final List<Translation> translations,
|
||||
required final List<ExerciseImage> images,
|
||||
required final List<Video> videos,
|
||||
@JsonKey(name: 'author_history') required final List<String> authors,
|
||||
@JsonKey(name: 'total_authors_history')
|
||||
required final List<String> authorsGlobal})
|
||||
@JsonKey(name: 'total_authors_history') required final List<String> authorsGlobal})
|
||||
: _muscles = muscles,
|
||||
_musclesSecondary = musclesSecondary,
|
||||
_equipment = equipment,
|
||||
@@ -257,8 +245,7 @@ class _ExerciseBaseData implements ExerciseApiData {
|
||||
_videos = videos,
|
||||
_authors = authors,
|
||||
_authorsGlobal = authorsGlobal;
|
||||
factory _ExerciseBaseData.fromJson(Map<String, dynamic> json) =>
|
||||
_$ExerciseBaseDataFromJson(json);
|
||||
factory _ExerciseBaseData.fromJson(Map<String, dynamic> json) => _$ExerciseBaseDataFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -296,8 +283,7 @@ class _ExerciseBaseData implements ExerciseApiData {
|
||||
@override
|
||||
@JsonKey(name: 'muscles_secondary')
|
||||
List<Muscle> get musclesSecondary {
|
||||
if (_musclesSecondary is EqualUnmodifiableListView)
|
||||
return _musclesSecondary;
|
||||
if (_musclesSecondary is EqualUnmodifiableListView) return _musclesSecondary;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_musclesSecondary);
|
||||
}
|
||||
@@ -383,27 +369,20 @@ class _ExerciseBaseData implements ExerciseApiData {
|
||||
other is _ExerciseBaseData &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.uuid, uuid) || other.uuid == uuid) &&
|
||||
(identical(other.variationId, variationId) ||
|
||||
other.variationId == variationId) &&
|
||||
(identical(other.variationId, variationId) || other.variationId == variationId) &&
|
||||
(identical(other.created, created) || other.created == created) &&
|
||||
(identical(other.lastUpdate, lastUpdate) ||
|
||||
other.lastUpdate == lastUpdate) &&
|
||||
(identical(other.lastUpdate, lastUpdate) || other.lastUpdate == lastUpdate) &&
|
||||
(identical(other.lastUpdateGlobal, lastUpdateGlobal) ||
|
||||
other.lastUpdateGlobal == lastUpdateGlobal) &&
|
||||
(identical(other.category, category) ||
|
||||
other.category == category) &&
|
||||
(identical(other.category, category) || other.category == category) &&
|
||||
const DeepCollectionEquality().equals(other._muscles, _muscles) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._musclesSecondary, _musclesSecondary) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._equipment, _equipment) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._translations, _translations) &&
|
||||
const DeepCollectionEquality().equals(other._musclesSecondary, _musclesSecondary) &&
|
||||
const DeepCollectionEquality().equals(other._equipment, _equipment) &&
|
||||
const DeepCollectionEquality().equals(other._translations, _translations) &&
|
||||
const DeepCollectionEquality().equals(other._images, _images) &&
|
||||
const DeepCollectionEquality().equals(other._videos, _videos) &&
|
||||
const DeepCollectionEquality().equals(other._authors, _authors) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._authorsGlobal, _authorsGlobal));
|
||||
const DeepCollectionEquality().equals(other._authorsGlobal, _authorsGlobal));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -433,8 +412,7 @@ class _ExerciseBaseData implements ExerciseApiData {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ExerciseBaseDataCopyWith<$Res>
|
||||
implements $ExerciseApiDataCopyWith<$Res> {
|
||||
abstract mixin class _$ExerciseBaseDataCopyWith<$Res> implements $ExerciseApiDataCopyWith<$Res> {
|
||||
factory _$ExerciseBaseDataCopyWith(
|
||||
_ExerciseBaseData value, $Res Function(_ExerciseBaseData) _then) =
|
||||
__$ExerciseBaseDataCopyWithImpl;
|
||||
@@ -451,8 +429,7 @@ abstract mixin class _$ExerciseBaseDataCopyWith<$Res>
|
||||
List<Muscle> muscles,
|
||||
@JsonKey(name: 'muscles_secondary') List<Muscle> musclesSecondary,
|
||||
List<Equipment> equipment,
|
||||
@JsonKey(name: 'translations', defaultValue: [])
|
||||
List<Translation> translations,
|
||||
@JsonKey(name: 'translations', defaultValue: []) List<Translation> translations,
|
||||
List<ExerciseImage> images,
|
||||
List<Video> videos,
|
||||
@JsonKey(name: 'author_history') List<String> authors,
|
||||
@@ -460,8 +437,7 @@ abstract mixin class _$ExerciseBaseDataCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$ExerciseBaseDataCopyWithImpl<$Res>
|
||||
implements _$ExerciseBaseDataCopyWith<$Res> {
|
||||
class __$ExerciseBaseDataCopyWithImpl<$Res> implements _$ExerciseBaseDataCopyWith<$Res> {
|
||||
__$ExerciseBaseDataCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ExerciseBaseData _self;
|
||||
@@ -584,11 +560,9 @@ mixin _$ExerciseSearchDetails {
|
||||
other is ExerciseSearchDetails &&
|
||||
(identical(other.translationId, translationId) ||
|
||||
other.translationId == translationId) &&
|
||||
(identical(other.exerciseId, exerciseId) ||
|
||||
other.exerciseId == exerciseId) &&
|
||||
(identical(other.exerciseId, exerciseId) || other.exerciseId == exerciseId) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.category, category) ||
|
||||
other.category == category) &&
|
||||
(identical(other.category, category) || other.category == category) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.imageThumbnail, imageThumbnail) ||
|
||||
other.imageThumbnail == imageThumbnail));
|
||||
@@ -596,8 +570,8 @@ mixin _$ExerciseSearchDetails {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, translationId, exerciseId, name,
|
||||
category, image, imageThumbnail);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, translationId, exerciseId, name, category, image, imageThumbnail);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -607,8 +581,8 @@ mixin _$ExerciseSearchDetails {
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ExerciseSearchDetailsCopyWith<$Res> {
|
||||
factory $ExerciseSearchDetailsCopyWith(ExerciseSearchDetails value,
|
||||
$Res Function(ExerciseSearchDetails) _then) =
|
||||
factory $ExerciseSearchDetailsCopyWith(
|
||||
ExerciseSearchDetails value, $Res Function(ExerciseSearchDetails) _then) =
|
||||
_$ExerciseSearchDetailsCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -621,8 +595,7 @@ abstract mixin class $ExerciseSearchDetailsCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ExerciseSearchDetailsCopyWithImpl<$Res>
|
||||
implements $ExerciseSearchDetailsCopyWith<$Res> {
|
||||
class _$ExerciseSearchDetailsCopyWithImpl<$Res> implements $ExerciseSearchDetailsCopyWith<$Res> {
|
||||
_$ExerciseSearchDetailsCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ExerciseSearchDetails _self;
|
||||
@@ -707,8 +680,7 @@ class _ExerciseSearchDetails implements ExerciseSearchDetails {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ExerciseSearchDetailsCopyWith<_ExerciseSearchDetails> get copyWith =>
|
||||
__$ExerciseSearchDetailsCopyWithImpl<_ExerciseSearchDetails>(
|
||||
this, _$identity);
|
||||
__$ExerciseSearchDetailsCopyWithImpl<_ExerciseSearchDetails>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -724,11 +696,9 @@ class _ExerciseSearchDetails implements ExerciseSearchDetails {
|
||||
other is _ExerciseSearchDetails &&
|
||||
(identical(other.translationId, translationId) ||
|
||||
other.translationId == translationId) &&
|
||||
(identical(other.exerciseId, exerciseId) ||
|
||||
other.exerciseId == exerciseId) &&
|
||||
(identical(other.exerciseId, exerciseId) || other.exerciseId == exerciseId) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.category, category) ||
|
||||
other.category == category) &&
|
||||
(identical(other.category, category) || other.category == category) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.imageThumbnail, imageThumbnail) ||
|
||||
other.imageThumbnail == imageThumbnail));
|
||||
@@ -736,8 +706,8 @@ class _ExerciseSearchDetails implements ExerciseSearchDetails {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, translationId, exerciseId, name,
|
||||
category, image, imageThumbnail);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, translationId, exerciseId, name, category, image, imageThumbnail);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -748,8 +718,8 @@ class _ExerciseSearchDetails implements ExerciseSearchDetails {
|
||||
/// @nodoc
|
||||
abstract mixin class _$ExerciseSearchDetailsCopyWith<$Res>
|
||||
implements $ExerciseSearchDetailsCopyWith<$Res> {
|
||||
factory _$ExerciseSearchDetailsCopyWith(_ExerciseSearchDetails value,
|
||||
$Res Function(_ExerciseSearchDetails) _then) =
|
||||
factory _$ExerciseSearchDetailsCopyWith(
|
||||
_ExerciseSearchDetails value, $Res Function(_ExerciseSearchDetails) _then) =
|
||||
__$ExerciseSearchDetailsCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
@@ -763,8 +733,7 @@ abstract mixin class _$ExerciseSearchDetailsCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$ExerciseSearchDetailsCopyWithImpl<$Res>
|
||||
implements _$ExerciseSearchDetailsCopyWith<$Res> {
|
||||
class __$ExerciseSearchDetailsCopyWithImpl<$Res> implements _$ExerciseSearchDetailsCopyWith<$Res> {
|
||||
__$ExerciseSearchDetailsCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ExerciseSearchDetails _self;
|
||||
@@ -858,8 +827,7 @@ abstract mixin class $ExerciseSearchEntryCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ExerciseSearchEntryCopyWithImpl<$Res>
|
||||
implements $ExerciseSearchEntryCopyWith<$Res> {
|
||||
class _$ExerciseSearchEntryCopyWithImpl<$Res> implements $ExerciseSearchEntryCopyWith<$Res> {
|
||||
_$ExerciseSearchEntryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ExerciseSearchEntry _self;
|
||||
@@ -914,8 +882,7 @@ class _ExerciseSearchEntry implements ExerciseSearchEntry {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ExerciseSearchEntryCopyWith<_ExerciseSearchEntry> get copyWith =>
|
||||
__$ExerciseSearchEntryCopyWithImpl<_ExerciseSearchEntry>(
|
||||
this, _$identity);
|
||||
__$ExerciseSearchEntryCopyWithImpl<_ExerciseSearchEntry>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -946,8 +913,8 @@ class _ExerciseSearchEntry implements ExerciseSearchEntry {
|
||||
/// @nodoc
|
||||
abstract mixin class _$ExerciseSearchEntryCopyWith<$Res>
|
||||
implements $ExerciseSearchEntryCopyWith<$Res> {
|
||||
factory _$ExerciseSearchEntryCopyWith(_ExerciseSearchEntry value,
|
||||
$Res Function(_ExerciseSearchEntry) _then) =
|
||||
factory _$ExerciseSearchEntryCopyWith(
|
||||
_ExerciseSearchEntry value, $Res Function(_ExerciseSearchEntry) _then) =
|
||||
__$ExerciseSearchEntryCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
@@ -958,8 +925,7 @@ abstract mixin class _$ExerciseSearchEntryCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$ExerciseSearchEntryCopyWithImpl<$Res>
|
||||
implements _$ExerciseSearchEntryCopyWith<$Res> {
|
||||
class __$ExerciseSearchEntryCopyWithImpl<$Res> implements _$ExerciseSearchEntryCopyWith<$Res> {
|
||||
__$ExerciseSearchEntryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ExerciseSearchEntry _self;
|
||||
@@ -1005,8 +971,7 @@ mixin _$ExerciseApiSearch {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExerciseApiSearchCopyWith<ExerciseApiSearch> get copyWith =>
|
||||
_$ExerciseApiSearchCopyWithImpl<ExerciseApiSearch>(
|
||||
this as ExerciseApiSearch, _$identity);
|
||||
_$ExerciseApiSearchCopyWithImpl<ExerciseApiSearch>(this as ExerciseApiSearch, _$identity);
|
||||
|
||||
/// Serializes this ExerciseApiSearch to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
@@ -1016,14 +981,12 @@ mixin _$ExerciseApiSearch {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is ExerciseApiSearch &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.suggestions, suggestions));
|
||||
const DeepCollectionEquality().equals(other.suggestions, suggestions));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(suggestions));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(suggestions));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -1041,8 +1004,7 @@ abstract mixin class $ExerciseApiSearchCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ExerciseApiSearchCopyWithImpl<$Res>
|
||||
implements $ExerciseApiSearchCopyWith<$Res> {
|
||||
class _$ExerciseApiSearchCopyWithImpl<$Res> implements $ExerciseApiSearchCopyWith<$Res> {
|
||||
_$ExerciseApiSearchCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ExerciseApiSearch _self;
|
||||
@@ -1100,14 +1062,12 @@ class _ExerciseApiSearch implements ExerciseApiSearch {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _ExerciseApiSearch &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._suggestions, _suggestions));
|
||||
const DeepCollectionEquality().equals(other._suggestions, _suggestions));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_suggestions));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_suggestions));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -1116,8 +1076,7 @@ class _ExerciseApiSearch implements ExerciseApiSearch {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ExerciseApiSearchCopyWith<$Res>
|
||||
implements $ExerciseApiSearchCopyWith<$Res> {
|
||||
abstract mixin class _$ExerciseApiSearchCopyWith<$Res> implements $ExerciseApiSearchCopyWith<$Res> {
|
||||
factory _$ExerciseApiSearchCopyWith(
|
||||
_ExerciseApiSearch value, $Res Function(_ExerciseApiSearch) _then) =
|
||||
__$ExerciseApiSearchCopyWithImpl;
|
||||
@@ -1127,8 +1086,7 @@ abstract mixin class _$ExerciseApiSearchCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$ExerciseApiSearchCopyWithImpl<$Res>
|
||||
implements _$ExerciseApiSearchCopyWith<$Res> {
|
||||
class __$ExerciseApiSearchCopyWithImpl<$Res> implements _$ExerciseApiSearchCopyWith<$Res> {
|
||||
__$ExerciseApiSearchCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ExerciseApiSearch _self;
|
||||
|
||||
@@ -6,16 +6,14 @@ part of 'exercise_api.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_ExerciseBaseData _$ExerciseBaseDataFromJson(Map<String, dynamic> json) =>
|
||||
_ExerciseBaseData(
|
||||
_ExerciseBaseData _$ExerciseBaseDataFromJson(Map<String, dynamic> json) => _ExerciseBaseData(
|
||||
id: (json['id'] as num).toInt(),
|
||||
uuid: json['uuid'] as String,
|
||||
variationId: (json['variations'] as num?)?.toInt() ?? null,
|
||||
created: DateTime.parse(json['created'] as String),
|
||||
lastUpdate: DateTime.parse(json['last_update'] as String),
|
||||
lastUpdateGlobal: DateTime.parse(json['last_update_global'] as String),
|
||||
category:
|
||||
ExerciseCategory.fromJson(json['category'] as Map<String, dynamic>),
|
||||
category: ExerciseCategory.fromJson(json['category'] as Map<String, dynamic>),
|
||||
muscles: (json['muscles'] as List<dynamic>)
|
||||
.map((e) => Muscle.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
@@ -35,16 +33,12 @@ _ExerciseBaseData _$ExerciseBaseDataFromJson(Map<String, dynamic> json) =>
|
||||
videos: (json['videos'] as List<dynamic>)
|
||||
.map((e) => Video.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
authors: (json['author_history'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
authorsGlobal: (json['total_authors_history'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
authors: (json['author_history'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
authorsGlobal:
|
||||
(json['total_authors_history'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExerciseBaseDataToJson(_ExerciseBaseData instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseBaseDataToJson(_ExerciseBaseData instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'variations': instance.variationId,
|
||||
@@ -62,8 +56,7 @@ Map<String, dynamic> _$ExerciseBaseDataToJson(_ExerciseBaseData instance) =>
|
||||
'total_authors_history': instance.authorsGlobal,
|
||||
};
|
||||
|
||||
_ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(Map<String, dynamic> json) =>
|
||||
_ExerciseSearchDetails(
|
||||
translationId: (json['id'] as num).toInt(),
|
||||
exerciseId: (json['base_id'] as num).toInt(),
|
||||
@@ -73,8 +66,7 @@ _ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(
|
||||
imageThumbnail: json['image_thumbnail'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExerciseSearchDetailsToJson(
|
||||
_ExerciseSearchDetails instance) =>
|
||||
Map<String, dynamic> _$ExerciseSearchDetailsToJson(_ExerciseSearchDetails instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.translationId,
|
||||
'base_id': instance.exerciseId,
|
||||
@@ -87,25 +79,21 @@ Map<String, dynamic> _$ExerciseSearchDetailsToJson(
|
||||
_ExerciseSearchEntry _$ExerciseSearchEntryFromJson(Map<String, dynamic> json) =>
|
||||
_ExerciseSearchEntry(
|
||||
value: json['value'] as String,
|
||||
data:
|
||||
ExerciseSearchDetails.fromJson(json['data'] as Map<String, dynamic>),
|
||||
data: ExerciseSearchDetails.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExerciseSearchEntryToJson(
|
||||
_ExerciseSearchEntry instance) =>
|
||||
Map<String, dynamic> _$ExerciseSearchEntryToJson(_ExerciseSearchEntry instance) =>
|
||||
<String, dynamic>{
|
||||
'value': instance.value,
|
||||
'data': instance.data,
|
||||
};
|
||||
|
||||
_ExerciseApiSearch _$ExerciseApiSearchFromJson(Map<String, dynamic> json) =>
|
||||
_ExerciseApiSearch(
|
||||
_ExerciseApiSearch _$ExerciseApiSearchFromJson(Map<String, dynamic> json) => _ExerciseApiSearch(
|
||||
suggestions: (json['suggestions'] as List<dynamic>)
|
||||
.map((e) => ExerciseSearchEntry.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExerciseApiSearchToJson(_ExerciseApiSearch instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseApiSearchToJson(_ExerciseApiSearch instance) => <String, dynamic>{
|
||||
'suggestions': instance.suggestions,
|
||||
};
|
||||
|
||||
@@ -20,8 +20,7 @@ ExerciseImage _$ExerciseImageFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'exercise': instance.exerciseId,
|
||||
|
||||
@@ -25,10 +25,9 @@ mixin _$IngredientApiSearchDetails {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$IngredientApiSearchDetailsCopyWith<IngredientApiSearchDetails>
|
||||
get copyWith =>
|
||||
_$IngredientApiSearchDetailsCopyWithImpl<IngredientApiSearchDetails>(
|
||||
this as IngredientApiSearchDetails, _$identity);
|
||||
$IngredientApiSearchDetailsCopyWith<IngredientApiSearchDetails> get copyWith =>
|
||||
_$IngredientApiSearchDetailsCopyWithImpl<IngredientApiSearchDetails>(
|
||||
this as IngredientApiSearchDetails, _$identity);
|
||||
|
||||
/// Serializes this IngredientApiSearchDetails to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
@@ -57,8 +56,8 @@ mixin _$IngredientApiSearchDetails {
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $IngredientApiSearchDetailsCopyWith<$Res> {
|
||||
factory $IngredientApiSearchDetailsCopyWith(IngredientApiSearchDetails value,
|
||||
$Res Function(IngredientApiSearchDetails) _then) =
|
||||
factory $IngredientApiSearchDetailsCopyWith(
|
||||
IngredientApiSearchDetails value, $Res Function(IngredientApiSearchDetails) _then) =
|
||||
_$IngredientApiSearchDetailsCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -134,9 +133,8 @@ class _IngredientApiSearchDetails implements IngredientApiSearchDetails {
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$IngredientApiSearchDetailsCopyWith<_IngredientApiSearchDetails>
|
||||
get copyWith => __$IngredientApiSearchDetailsCopyWithImpl<
|
||||
_IngredientApiSearchDetails>(this, _$identity);
|
||||
_$IngredientApiSearchDetailsCopyWith<_IngredientApiSearchDetails> get copyWith =>
|
||||
__$IngredientApiSearchDetailsCopyWithImpl<_IngredientApiSearchDetails>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -171,8 +169,7 @@ class _IngredientApiSearchDetails implements IngredientApiSearchDetails {
|
||||
abstract mixin class _$IngredientApiSearchDetailsCopyWith<$Res>
|
||||
implements $IngredientApiSearchDetailsCopyWith<$Res> {
|
||||
factory _$IngredientApiSearchDetailsCopyWith(
|
||||
_IngredientApiSearchDetails value,
|
||||
$Res Function(_IngredientApiSearchDetails) _then) =
|
||||
_IngredientApiSearchDetails value, $Res Function(_IngredientApiSearchDetails) _then) =
|
||||
__$IngredientApiSearchDetailsCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
@@ -259,8 +256,8 @@ mixin _$IngredientApiSearchEntry {
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $IngredientApiSearchEntryCopyWith<$Res> {
|
||||
factory $IngredientApiSearchEntryCopyWith(IngredientApiSearchEntry value,
|
||||
$Res Function(IngredientApiSearchEntry) _then) =
|
||||
factory $IngredientApiSearchEntryCopyWith(
|
||||
IngredientApiSearchEntry value, $Res Function(IngredientApiSearchEntry) _then) =
|
||||
_$IngredientApiSearchEntryCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({String value, IngredientApiSearchDetails data});
|
||||
@@ -325,8 +322,7 @@ class _IngredientApiSearchEntry implements IngredientApiSearchEntry {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$IngredientApiSearchEntryCopyWith<_IngredientApiSearchEntry> get copyWith =>
|
||||
__$IngredientApiSearchEntryCopyWithImpl<_IngredientApiSearchEntry>(
|
||||
this, _$identity);
|
||||
__$IngredientApiSearchEntryCopyWithImpl<_IngredientApiSearchEntry>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -357,8 +353,8 @@ class _IngredientApiSearchEntry implements IngredientApiSearchEntry {
|
||||
/// @nodoc
|
||||
abstract mixin class _$IngredientApiSearchEntryCopyWith<$Res>
|
||||
implements $IngredientApiSearchEntryCopyWith<$Res> {
|
||||
factory _$IngredientApiSearchEntryCopyWith(_IngredientApiSearchEntry value,
|
||||
$Res Function(_IngredientApiSearchEntry) _then) =
|
||||
factory _$IngredientApiSearchEntryCopyWith(
|
||||
_IngredientApiSearchEntry value, $Res Function(_IngredientApiSearchEntry) _then) =
|
||||
__$IngredientApiSearchEntryCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
@@ -427,14 +423,12 @@ mixin _$IngredientApiSearch {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is IngredientApiSearch &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.suggestions, suggestions));
|
||||
const DeepCollectionEquality().equals(other.suggestions, suggestions));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(suggestions));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(suggestions));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -452,8 +446,7 @@ abstract mixin class $IngredientApiSearchCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$IngredientApiSearchCopyWithImpl<$Res>
|
||||
implements $IngredientApiSearchCopyWith<$Res> {
|
||||
class _$IngredientApiSearchCopyWithImpl<$Res> implements $IngredientApiSearchCopyWith<$Res> {
|
||||
_$IngredientApiSearchCopyWithImpl(this._self, this._then);
|
||||
|
||||
final IngredientApiSearch _self;
|
||||
@@ -478,8 +471,7 @@ class _$IngredientApiSearchCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _IngredientApiSearch implements IngredientApiSearch {
|
||||
_IngredientApiSearch(
|
||||
{required final List<IngredientApiSearchEntry> suggestions})
|
||||
_IngredientApiSearch({required final List<IngredientApiSearchEntry> suggestions})
|
||||
: _suggestions = suggestions;
|
||||
factory _IngredientApiSearch.fromJson(Map<String, dynamic> json) =>
|
||||
_$IngredientApiSearchFromJson(json);
|
||||
@@ -498,8 +490,7 @@ class _IngredientApiSearch implements IngredientApiSearch {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$IngredientApiSearchCopyWith<_IngredientApiSearch> get copyWith =>
|
||||
__$IngredientApiSearchCopyWithImpl<_IngredientApiSearch>(
|
||||
this, _$identity);
|
||||
__$IngredientApiSearchCopyWithImpl<_IngredientApiSearch>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -513,14 +504,12 @@ class _IngredientApiSearch implements IngredientApiSearch {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _IngredientApiSearch &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._suggestions, _suggestions));
|
||||
const DeepCollectionEquality().equals(other._suggestions, _suggestions));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_suggestions));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_suggestions));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -531,8 +520,8 @@ class _IngredientApiSearch implements IngredientApiSearch {
|
||||
/// @nodoc
|
||||
abstract mixin class _$IngredientApiSearchCopyWith<$Res>
|
||||
implements $IngredientApiSearchCopyWith<$Res> {
|
||||
factory _$IngredientApiSearchCopyWith(_IngredientApiSearch value,
|
||||
$Res Function(_IngredientApiSearch) _then) =
|
||||
factory _$IngredientApiSearchCopyWith(
|
||||
_IngredientApiSearch value, $Res Function(_IngredientApiSearch) _then) =
|
||||
__$IngredientApiSearchCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
@@ -540,8 +529,7 @@ abstract mixin class _$IngredientApiSearchCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$IngredientApiSearchCopyWithImpl<$Res>
|
||||
implements _$IngredientApiSearchCopyWith<$Res> {
|
||||
class __$IngredientApiSearchCopyWithImpl<$Res> implements _$IngredientApiSearchCopyWith<$Res> {
|
||||
__$IngredientApiSearchCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _IngredientApiSearch _self;
|
||||
|
||||
@@ -6,8 +6,7 @@ part of 'ingredient_api.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(Map<String, dynamic> json) =>
|
||||
_IngredientApiSearchDetails(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
@@ -15,8 +14,7 @@ _IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(
|
||||
imageThumbnail: json['image_thumbnail'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$IngredientApiSearchDetailsToJson(
|
||||
_IngredientApiSearchDetails instance) =>
|
||||
Map<String, dynamic> _$IngredientApiSearchDetailsToJson(_IngredientApiSearchDetails instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
@@ -24,16 +22,13 @@ Map<String, dynamic> _$IngredientApiSearchDetailsToJson(
|
||||
'image_thumbnail': instance.imageThumbnail,
|
||||
};
|
||||
|
||||
_IngredientApiSearchEntry _$IngredientApiSearchEntryFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_IngredientApiSearchEntry _$IngredientApiSearchEntryFromJson(Map<String, dynamic> json) =>
|
||||
_IngredientApiSearchEntry(
|
||||
value: json['value'] as String,
|
||||
data: IngredientApiSearchDetails.fromJson(
|
||||
json['data'] as Map<String, dynamic>),
|
||||
data: IngredientApiSearchDetails.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$IngredientApiSearchEntryToJson(
|
||||
_IngredientApiSearchEntry instance) =>
|
||||
Map<String, dynamic> _$IngredientApiSearchEntryToJson(_IngredientApiSearchEntry instance) =>
|
||||
<String, dynamic>{
|
||||
'value': instance.value,
|
||||
'data': instance.data,
|
||||
@@ -42,13 +37,11 @@ Map<String, dynamic> _$IngredientApiSearchEntryToJson(
|
||||
_IngredientApiSearch _$IngredientApiSearchFromJson(Map<String, dynamic> json) =>
|
||||
_IngredientApiSearch(
|
||||
suggestions: (json['suggestions'] as List<dynamic>)
|
||||
.map((e) =>
|
||||
IngredientApiSearchEntry.fromJson(e as Map<String, dynamic>))
|
||||
.map((e) => IngredientApiSearchEntry.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$IngredientApiSearchToJson(
|
||||
_IngredientApiSearch instance) =>
|
||||
Map<String, dynamic> _$IngredientApiSearchToJson(_IngredientApiSearch instance) =>
|
||||
<String, dynamic>{
|
||||
'suggestions': instance.suggestions,
|
||||
};
|
||||
|
||||
@@ -9,22 +9,12 @@ part of 'translation.dart';
|
||||
Translation _$TranslationFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'uuid',
|
||||
'language',
|
||||
'created',
|
||||
'exercise',
|
||||
'name',
|
||||
'description'
|
||||
],
|
||||
requiredKeys: const ['id', 'uuid', 'language', 'created', 'exercise', 'name', 'description'],
|
||||
);
|
||||
return Translation(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
uuid: json['uuid'] as String?,
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
exerciseId: (json['exercise'] as num?)?.toInt(),
|
||||
@@ -38,8 +28,7 @@ Translation _$TranslationFromJson(Map<String, dynamic> json) {
|
||||
.toList();
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$TranslationToJson(Translation instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$TranslationToJson(Translation instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'language': instance.languageId,
|
||||
|
||||
@@ -22,9 +22,7 @@ MeasurementCategory _$MeasurementCategoryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$MeasurementCategoryToJson(
|
||||
MeasurementCategory instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$MeasurementCategoryToJson(MeasurementCategory instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
|
||||
@@ -20,8 +20,7 @@ MeasurementEntry _$MeasurementEntryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'category': instance.category,
|
||||
'date': dateToYYYYMMDD(instance.date),
|
||||
|
||||
@@ -51,8 +51,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientToJson(Ingredient instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$IngredientToJson(Ingredient instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'remote_id': instance.remoteId,
|
||||
'source_name': instance.sourceName,
|
||||
|
||||
@@ -38,8 +38,7 @@ IngredientImage _$IngredientImageFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'ingredient_id': instance.ingredientId,
|
||||
|
||||
@@ -13,16 +13,14 @@ IngredientWeightUnit _$IngredientWeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
return IngredientWeightUnit(
|
||||
id: (json['id'] as num).toInt(),
|
||||
weightUnit:
|
||||
WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
|
||||
weightUnit: WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
|
||||
ingredient: Ingredient.fromJson(json['ingredient'] as Map<String, dynamic>),
|
||||
grams: (json['grams'] as num).toInt(),
|
||||
amount: (json['amount'] as num).toDouble(),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientWeightUnitToJson(
|
||||
IngredientWeightUnit instance) =>
|
||||
Map<String, dynamic> _$IngredientWeightUnitToJson(IngredientWeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'weight_unit': instance.weightUnit,
|
||||
|
||||
@@ -9,14 +9,7 @@ part of 'log.dart';
|
||||
Log _$LogFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'plan',
|
||||
'datetime',
|
||||
'ingredient',
|
||||
'weight_unit',
|
||||
'amount'
|
||||
],
|
||||
requiredKeys: const ['id', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount'],
|
||||
);
|
||||
return Log(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
|
||||
@@ -104,15 +104,12 @@ class NutritionalPlan {
|
||||
}
|
||||
|
||||
// Boilerplate
|
||||
factory NutritionalPlan.fromJson(Map<String, dynamic> json) =>
|
||||
_$NutritionalPlanFromJson(json);
|
||||
factory NutritionalPlan.fromJson(Map<String, dynamic> json) => _$NutritionalPlanFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$NutritionalPlanToJson(this);
|
||||
|
||||
String getLabel(BuildContext context) {
|
||||
return description != ''
|
||||
? description
|
||||
: AppLocalizations.of(context).nutritionalPlan;
|
||||
return description != '' ? description : AppLocalizations.of(context).nutritionalPlan;
|
||||
}
|
||||
|
||||
bool get hasAnyGoals {
|
||||
@@ -167,9 +164,7 @@ class NutritionalPlan {
|
||||
final now = DateTime.now();
|
||||
final today = DateTime(now.year, now.month, now.day);
|
||||
|
||||
return logEntriesValues.containsKey(today)
|
||||
? logEntriesValues[today]!
|
||||
: NutritionalValues();
|
||||
return logEntriesValues.containsKey(today) ? logEntriesValues[today]! : NutritionalValues();
|
||||
}
|
||||
|
||||
NutritionalValues get loggedNutritionalValues7DayAvg {
|
||||
@@ -185,8 +180,7 @@ class NutritionalPlan {
|
||||
Map<DateTime, NutritionalValues> get logEntriesValues {
|
||||
final out = <DateTime, NutritionalValues>{};
|
||||
for (final log in diaryEntries) {
|
||||
final date =
|
||||
DateTime(log.datetime.year, log.datetime.month, log.datetime.day);
|
||||
final date = DateTime(log.datetime.year, log.datetime.month, log.datetime.day);
|
||||
|
||||
if (!out.containsKey(date)) {
|
||||
out[date] = NutritionalValues();
|
||||
@@ -211,8 +205,7 @@ class NutritionalPlan {
|
||||
final List<Log> out = [];
|
||||
for (final log in diaryEntries) {
|
||||
final dateKey = DateTime(date.year, date.month, date.day);
|
||||
final logKey =
|
||||
DateTime(log.datetime.year, log.datetime.month, log.datetime.day);
|
||||
final logKey = DateTime(log.datetime.year, log.datetime.month, log.datetime.day);
|
||||
|
||||
if (dateKey == logKey) {
|
||||
out.add(log);
|
||||
@@ -229,9 +222,7 @@ class NutritionalPlan {
|
||||
for (final meal in meals) {
|
||||
for (final mealItem in meal.mealItems) {
|
||||
final found = out.firstWhereOrNull(
|
||||
(e) =>
|
||||
e.amount == mealItem.amount &&
|
||||
e.ingredientId == mealItem.ingredientId,
|
||||
(e) => e.amount == mealItem.amount && e.ingredientId == mealItem.ingredientId,
|
||||
);
|
||||
|
||||
if (found == null) {
|
||||
|
||||
@@ -38,8 +38,7 @@ NutritionalPlan _$NutritionalPlanFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'description': instance.description,
|
||||
'creation_date': dateToYYYYMMDD(instance.creationDate),
|
||||
|
||||
@@ -17,8 +17,7 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -9,13 +9,7 @@ part of 'profile.dart';
|
||||
Profile _$ProfileFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'username',
|
||||
'email_verified',
|
||||
'is_trustworthy',
|
||||
'weight_unit',
|
||||
'email'
|
||||
],
|
||||
requiredKeys: const ['username', 'email_verified', 'is_trustworthy', 'weight_unit', 'email'],
|
||||
);
|
||||
return Profile(
|
||||
username: json['username'] as String,
|
||||
|
||||
@@ -32,8 +32,7 @@ BaseConfig _$BaseConfigFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$BaseConfigToJson(BaseConfig instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$BaseConfigToJson(BaseConfig instance) => <String, dynamic>{
|
||||
'slot_entry': instance.slotEntryId,
|
||||
'iteration': instance.iteration,
|
||||
'value': instance.value,
|
||||
|
||||
@@ -15,9 +15,7 @@ DayData _$DayDataFromJson(Map<String, dynamic> json) {
|
||||
iteration: (json['iteration'] as num).toInt(),
|
||||
date: DateTime.parse(json['date'] as String),
|
||||
label: json['label'] as String? ?? '',
|
||||
day: json['day'] == null
|
||||
? null
|
||||
: Day.fromJson(json['day'] as Map<String, dynamic>),
|
||||
day: json['day'] == null ? null : Day.fromJson(json['day'] as Map<String, dynamic>),
|
||||
slots: (json['slots'] as List<dynamic>?)
|
||||
?.map((e) => SlotData.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
|
||||
@@ -33,8 +33,7 @@ Log _$LogFromJson(Map<String, dynamic> json) {
|
||||
routineId: (json['routine'] as num).toInt(),
|
||||
repetitions: stringToNum(json['repetitions'] as String?),
|
||||
repetitionsTarget: stringToNum(json['repetitions_target'] as String?),
|
||||
repetitionsUnitId:
|
||||
(json['repetitions_unit'] as num?)?.toInt() ?? REP_UNIT_REPETITIONS_ID,
|
||||
repetitionsUnitId: (json['repetitions_unit'] as num?)?.toInt() ?? REP_UNIT_REPETITIONS_ID,
|
||||
rir: stringToNum(json['rir'] as String?),
|
||||
rirTarget: stringToNum(json['rir_target'] as String?),
|
||||
weight: stringToNum(json['weight'] as String?),
|
||||
|
||||
@@ -17,8 +17,7 @@ RepetitionUnit _$RepetitionUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -9,24 +9,13 @@ part of 'routine.dart';
|
||||
Routine _$RoutineFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'created',
|
||||
'name',
|
||||
'description',
|
||||
'fit_in_week',
|
||||
'start',
|
||||
'end'
|
||||
],
|
||||
requiredKeys: const ['id', 'created', 'name', 'description', 'fit_in_week', 'start', 'end'],
|
||||
);
|
||||
return Routine(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
|
||||
name: json['name'] as String,
|
||||
start:
|
||||
json['start'] == null ? null : DateTime.parse(json['start'] as String),
|
||||
start: json['start'] == null ? null : DateTime.parse(json['start'] as String),
|
||||
end: json['end'] == null ? null : DateTime.parse(json['end'] as String),
|
||||
fitInWeek: json['fit_in_week'] as bool? ?? false,
|
||||
description: json['description'] as String?,
|
||||
|
||||
@@ -9,23 +9,13 @@ part of 'session.dart';
|
||||
WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'routine',
|
||||
'day',
|
||||
'date',
|
||||
'impression',
|
||||
'time_start',
|
||||
'time_end'
|
||||
],
|
||||
requiredKeys: const ['id', 'routine', 'day', 'date', 'impression', 'time_start', 'time_end'],
|
||||
);
|
||||
return WorkoutSession(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
dayId: (json['day'] as num?)?.toInt(),
|
||||
routineId: (json['routine'] as num).toInt(),
|
||||
impression: json['impression'] == null
|
||||
? 2
|
||||
: int.parse(json['impression'] as String),
|
||||
impression: json['impression'] == null ? 2 : int.parse(json['impression'] as String),
|
||||
notes: json['notes'] as String? ?? '',
|
||||
timeStart: stringToTimeNull(json['time_start'] as String?),
|
||||
timeEnd: stringToTimeNull(json['time_end'] as String?),
|
||||
@@ -37,8 +27,7 @@ WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'routine': instance.routineId,
|
||||
'day': instance.dayId,
|
||||
|
||||
@@ -20,7 +20,6 @@ WorkoutSessionApi _$WorkoutSessionApiFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WorkoutSessionApiToJson(WorkoutSessionApi instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WorkoutSessionApiToJson(WorkoutSessionApi instance) => <String, dynamic>{
|
||||
'session': instance.session,
|
||||
};
|
||||
|
||||
@@ -46,8 +46,7 @@ SetConfigData _$SetConfigDataFromJson(Map<String, dynamic> json) {
|
||||
: stringToNumNull(json['weight_rounding'] as String?),
|
||||
repetitions: stringToNumNull(json['repetitions'] as String?),
|
||||
maxRepetitions: stringToNumNull(json['max_repetitions'] as String?),
|
||||
repetitionsUnitId:
|
||||
(json['repetitions_unit'] as num?)?.toInt() ?? REP_UNIT_REPETITIONS_ID,
|
||||
repetitionsUnitId: (json['repetitions_unit'] as num?)?.toInt() ?? REP_UNIT_REPETITIONS_ID,
|
||||
repetitionsRounding: json['repetitions_rounding'] == null
|
||||
? null
|
||||
: stringToNumNull(json['repetitions_rounding'] as String?),
|
||||
@@ -61,8 +60,7 @@ SetConfigData _$SetConfigDataFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$SetConfigDataToJson(SetConfigData instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$SetConfigDataToJson(SetConfigData instance) => <String, dynamic>{
|
||||
'exercise': instance.exerciseId,
|
||||
'slot_entry_id': instance.slotEntryId,
|
||||
'type': instance.type,
|
||||
|
||||
@@ -14,10 +14,8 @@ SlotData _$SlotDataFromJson(Map<String, dynamic> json) {
|
||||
return SlotData(
|
||||
comment: json['comment'] as String,
|
||||
isSuperset: json['is_superset'] as bool,
|
||||
exerciseIds: (json['exercises'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toInt())
|
||||
.toList() ??
|
||||
const [],
|
||||
exerciseIds:
|
||||
(json['exercises'] as List<dynamic>?)?.map((e) => (e as num).toInt()).toList() ?? const [],
|
||||
setConfigs: (json['sets'] as List<dynamic>?)
|
||||
?.map((e) => SetConfigData.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
|
||||
@@ -17,8 +17,7 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -126,8 +126,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
|
||||
/// Fetches and sets all plans fully, i.e. with all corresponding child objects
|
||||
Future<void> fetchAndSetAllPlansFull() async {
|
||||
final data = await baseProvider
|
||||
.fetchPaginated(baseProvider.makeUrl(_nutritionalPlansPath));
|
||||
final data = await baseProvider.fetchPaginated(baseProvider.makeUrl(_nutritionalPlansPath));
|
||||
await Future.wait(data.map((e) => fetchAndSetPlanFull(e['id'])).toList());
|
||||
}
|
||||
|
||||
@@ -188,8 +187,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
// Logs
|
||||
await fetchAndSetLogs(plan);
|
||||
for (final meal in meals) {
|
||||
meal.diaryEntries =
|
||||
plan.diaryEntries.where((e) => e.mealId == meal.id).toList();
|
||||
meal.diaryEntries = plan.diaryEntries.where((e) => e.mealId == meal.id).toList();
|
||||
}
|
||||
|
||||
// ... and done
|
||||
@@ -223,8 +221,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
_plans.removeAt(existingPlanIndex);
|
||||
notifyListeners();
|
||||
|
||||
final response =
|
||||
await baseProvider.deleteRequest(_nutritionalPlansPath, id);
|
||||
final response = await baseProvider.deleteRequest(_nutritionalPlansPath, id);
|
||||
|
||||
if (response.statusCode >= 400) {
|
||||
_plans.insert(existingPlanIndex, existingPlan);
|
||||
@@ -304,8 +301,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
notifyListeners();
|
||||
|
||||
// Try to delete
|
||||
final response =
|
||||
await baseProvider.deleteRequest(_mealItemPath, mealItem.id!);
|
||||
final response = await baseProvider.deleteRequest(_mealItemPath, mealItem.id!);
|
||||
if (response.statusCode >= 400) {
|
||||
meal.mealItems.insert(mealItemIndex, existingMealItem);
|
||||
notifyListeners();
|
||||
@@ -320,8 +316,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
/// Fetch and return an ingredient
|
||||
///
|
||||
/// If the ingredient is not known locally, it is fetched from the server
|
||||
Future<Ingredient> fetchIngredient(int ingredientId,
|
||||
{IngredientDatabase? database}) async {
|
||||
Future<Ingredient> fetchIngredient(int ingredientId, {IngredientDatabase? database}) async {
|
||||
database ??= this.database;
|
||||
Ingredient ingredient;
|
||||
|
||||
@@ -339,11 +334,9 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
_logger.info("Loaded ingredient '${ingredient.name}' from db cache");
|
||||
|
||||
// Prune old entries
|
||||
if (DateTime.now().isAfter(ingredientDb.lastFetched
|
||||
.add(const Duration(days: DAYS_TO_CACHE)))) {
|
||||
(database.delete(database.ingredients)
|
||||
..where((i) => i.id.equals(ingredientId)))
|
||||
.go();
|
||||
if (DateTime.now()
|
||||
.isAfter(ingredientDb.lastFetched.add(const Duration(days: DAYS_TO_CACHE)))) {
|
||||
(database.delete(database.ingredients)..where((i) => i.id.equals(ingredientId))).go();
|
||||
}
|
||||
} else {
|
||||
final data = await baseProvider.fetch(
|
||||
@@ -371,9 +364,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
final ingredientDb = await database.select(database.ingredients).get();
|
||||
_logger.info('Read ${ingredientDb.length} ingredients from db cache');
|
||||
if (ingredientDb.isNotEmpty) {
|
||||
ingredients = ingredientDb
|
||||
.map((e) => Ingredient.fromJson(jsonDecode(e.data)))
|
||||
.toList();
|
||||
ingredients = ingredientDb.map((e) => Ingredient.fromJson(jsonDecode(e.data))).toList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@ List<Widget> getOverviewWidgets(
|
||||
height: 220,
|
||||
child: MeasurementChartWidgetFl(raw, unit, avgs: avg),
|
||||
),
|
||||
if (avg.isNotEmpty)
|
||||
MeasurementOverallChangeWidget(avg.first, avg.last, unit),
|
||||
if (avg.isNotEmpty) MeasurementOverallChangeWidget(avg.first, avg.last, unit),
|
||||
const SizedBox(height: 8),
|
||||
];
|
||||
}
|
||||
@@ -55,8 +54,7 @@ List<Widget> getOverviewWidgetsSeries(
|
||||
),
|
||||
if (showPlan)
|
||||
...getOverviewWidgets(
|
||||
AppLocalizations.of(context)
|
||||
.chartDuringPlanTitle(name, plan.description),
|
||||
AppLocalizations.of(context).chartDuringPlanTitle(name, plan.description),
|
||||
entriesAll
|
||||
.where((e) =>
|
||||
e.date.isAfter(plan.startDate) &&
|
||||
@@ -75,15 +73,13 @@ List<Widget> getOverviewWidgetsSeries(
|
||||
// then let's show a separate chart just focusing on the last 30 days,
|
||||
// if there is data for it.
|
||||
if (entriesAll.isNotEmpty &&
|
||||
entriesAll.first.date.isBefore(
|
||||
entriesAll.last.date.subtract(const Duration(days: 75))) &&
|
||||
entriesAll.first.date.isBefore(entriesAll.last.date.subtract(const Duration(days: 75))) &&
|
||||
(plan == null ||
|
||||
(showPlan &&
|
||||
entriesAll
|
||||
.firstWhere((e) => e.date.isAfter(plan.startDate))
|
||||
.date
|
||||
.isBefore(entriesAll.last.date
|
||||
.subtract(const Duration(days: 30))))) &&
|
||||
.isBefore(entriesAll.last.date.subtract(const Duration(days: 30))))) &&
|
||||
entriesAll.any((e) => e.date.isAfter(monthAgo)))
|
||||
...getOverviewWidgets(
|
||||
AppLocalizations.of(context).chart30DaysTitle(name),
|
||||
|
||||
@@ -42,8 +42,7 @@ class MealForm extends StatelessWidget {
|
||||
final _nameController = TextEditingController();
|
||||
|
||||
MealForm(this._planId, [meal]) {
|
||||
_meal = meal ??
|
||||
Meal(plan: _planId, time: TimeOfDay.fromDateTime(DateTime.now()));
|
||||
_meal = meal ?? Meal(plan: _planId, time: TimeOfDay.fromDateTime(DateTime.now()));
|
||||
_timeController.text = timeToString(_meal.time)!;
|
||||
_nameController.text = _meal.name;
|
||||
}
|
||||
@@ -58,8 +57,7 @@ class MealForm extends StatelessWidget {
|
||||
children: [
|
||||
TextFormField(
|
||||
key: const Key('field-time'),
|
||||
decoration:
|
||||
InputDecoration(labelText: AppLocalizations.of(context).time),
|
||||
decoration: InputDecoration(labelText: AppLocalizations.of(context).time),
|
||||
controller: _timeController,
|
||||
onTap: () async {
|
||||
// Stop keyboard from appearing
|
||||
@@ -81,8 +79,7 @@ class MealForm extends StatelessWidget {
|
||||
TextFormField(
|
||||
maxLength: 25,
|
||||
key: const Key('field-name'),
|
||||
decoration:
|
||||
InputDecoration(labelText: AppLocalizations.of(context).name),
|
||||
decoration: InputDecoration(labelText: AppLocalizations.of(context).name),
|
||||
controller: _nameController,
|
||||
onSaved: (newValue) {
|
||||
_meal.name = newValue as String;
|
||||
@@ -128,8 +125,7 @@ Widget MealItemForm(
|
||||
recent: recent.map((e) => Log.fromMealItem(e, 0, e.mealId)).toList(),
|
||||
onSave: (BuildContext context, MealItem mealItem, DateTime? dt) {
|
||||
mealItem.mealId = meal.id!;
|
||||
Provider.of<NutritionPlansProvider>(context, listen: false)
|
||||
.addMealItem(mealItem, meal);
|
||||
Provider.of<NutritionPlansProvider>(context, listen: false).addMealItem(mealItem, meal);
|
||||
},
|
||||
barcode: barcode ?? '',
|
||||
test: test ?? false,
|
||||
@@ -239,11 +235,9 @@ class IngredientFormState extends State<IngredientForm> {
|
||||
Widget build(BuildContext context) {
|
||||
final String unit = AppLocalizations.of(context).g;
|
||||
final queryLower = _searchQuery.toLowerCase();
|
||||
final suggestions = widget.recent
|
||||
.where((e) => e.ingredient.name.toLowerCase().contains(queryLower))
|
||||
.toList();
|
||||
final numberFormat =
|
||||
NumberFormat.decimalPattern(Localizations.localeOf(context).toString());
|
||||
final suggestions =
|
||||
widget.recent.where((e) => e.ingredient.name.toLowerCase().contains(queryLower)).toList();
|
||||
final numberFormat = NumberFormat.decimalPattern(Localizations.localeOf(context).toString());
|
||||
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(20),
|
||||
@@ -350,8 +344,7 @@ class IngredientFormState extends State<IngredientForm> {
|
||||
),
|
||||
],
|
||||
),
|
||||
if (ingredientIdController.text.isNotEmpty &&
|
||||
_amountController.text.isNotEmpty)
|
||||
if (ingredientIdController.text.isNotEmpty && _amountController.text.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
@@ -402,8 +395,7 @@ class IngredientFormState extends State<IngredientForm> {
|
||||
return;
|
||||
}
|
||||
_form.currentState!.save();
|
||||
_mealItem.ingredientId =
|
||||
int.parse(_ingredientIdController.text);
|
||||
_mealItem.ingredientId = int.parse(_ingredientIdController.text);
|
||||
|
||||
var date = DateTime.parse(_dateController.text);
|
||||
final tod = stringToTime(_timeController.text);
|
||||
@@ -531,8 +523,7 @@ class _PlanFormState extends State<PlanForm> {
|
||||
_startDateController.text =
|
||||
'${widget._plan.startDate.year}-${widget._plan.startDate.month.toString().padLeft(2, '0')}-${widget._plan.startDate.day.toString().padLeft(2, '0')}';
|
||||
// ignore invalid enddates should the server gives us one
|
||||
if (widget._plan.endDate != null &&
|
||||
widget._plan.endDate!.isAfter(widget._plan.startDate)) {
|
||||
if (widget._plan.endDate != null && widget._plan.endDate!.isAfter(widget._plan.startDate)) {
|
||||
_endDateController.text =
|
||||
'${widget._plan.endDate!.year}-${widget._plan.endDate!.month.toString().padLeft(2, '0')}-${widget._plan.endDate!.day.toString().padLeft(2, '0')}';
|
||||
}
|
||||
@@ -624,12 +615,11 @@ class _PlanFormState extends State<PlanForm> {
|
||||
context: context,
|
||||
// if somehow the server has an invalid end date, default to null
|
||||
initialDate: (widget._plan.endDate != null &&
|
||||
widget._plan.endDate!
|
||||
.isAfter(widget._plan.startDate))
|
||||
widget._plan.endDate!.isAfter(widget._plan.startDate))
|
||||
? widget._plan.endDate!
|
||||
: null,
|
||||
firstDate: widget._plan.startDate.add(
|
||||
const Duration(days: 1)), // end must be after start
|
||||
firstDate: widget._plan.startDate
|
||||
.add(const Duration(days: 1)), // end must be after start
|
||||
lastDate: DateTime(2100),
|
||||
);
|
||||
|
||||
@@ -731,8 +721,7 @@ class _PlanFormState extends State<PlanForm> {
|
||||
val: widget._plan.goalCarbohydrates?.toString(),
|
||||
label: AppLocalizations.of(context).goalCarbohydrates,
|
||||
suffix: AppLocalizations.of(context).g,
|
||||
onSave: (double value) =>
|
||||
widget._plan.goalCarbohydrates = value,
|
||||
onSave: (double value) => widget._plan.goalCarbohydrates = value,
|
||||
key: const Key('field-goal-carbohydrates'),
|
||||
),
|
||||
GoalMacros(
|
||||
@@ -812,8 +801,7 @@ class GoalMacros extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final numberFormat =
|
||||
NumberFormat.decimalPattern(Localizations.localeOf(context).toString());
|
||||
final numberFormat = NumberFormat.decimalPattern(Localizations.localeOf(context).toString());
|
||||
|
||||
return TextFormField(
|
||||
initialValue: val ?? '',
|
||||
|
||||
@@ -36,11 +36,9 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final nutritionalGoals = _nutritionalPlan.nutritionalGoals;
|
||||
final lastWeightEntry =
|
||||
Provider.of<BodyWeightProvider>(context, listen: false)
|
||||
.getNewestEntry();
|
||||
final nutritionalGoalsGperKg = lastWeightEntry != null
|
||||
? nutritionalGoals / lastWeightEntry.weight.toDouble()
|
||||
: null;
|
||||
Provider.of<BodyWeightProvider>(context, listen: false).getNewestEntry();
|
||||
final nutritionalGoalsGperKg =
|
||||
lastWeightEntry != null ? nutritionalGoals / lastWeightEntry.weight.toDouble() : null;
|
||||
|
||||
return SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
@@ -91,8 +89,7 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
height: 220,
|
||||
child:
|
||||
FlNutritionalPlanPieChartWidget(nutritionalGoals.toValues()),
|
||||
child: FlNutritionalPlanPieChartWidget(nutritionalGoals.toValues()),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
|
||||
@@ -33,21 +33,17 @@ class NutritionalPlansList extends StatelessWidget {
|
||||
const NutritionalPlansList(this._nutritionProvider);
|
||||
|
||||
/// Builds the weight change information for a nutritional plan period
|
||||
Widget _buildWeightChangeInfo(
|
||||
BuildContext context, DateTime startDate, DateTime? endDate) {
|
||||
Widget _buildWeightChangeInfo(BuildContext context, DateTime startDate, DateTime? endDate) {
|
||||
final _provider = Provider.of<BodyWeightProvider>(context, listen: false);
|
||||
|
||||
final entriesAll = _provider.items
|
||||
.map((e) => MeasurementChartEntry(e.weight, e.date))
|
||||
.toList();
|
||||
final entriesAll = _provider.items.map((e) => MeasurementChartEntry(e.weight, e.date)).toList();
|
||||
final entries7dAvg = moving7dAverage(entriesAll);
|
||||
print('start: $startDate');
|
||||
print('end: $endDate');
|
||||
// Filter weight entries within the plan period
|
||||
final DateTime planEndDate = endDate ?? DateTime.now();
|
||||
final List<MeasurementChartEntry> entriesInPeriod = entries7dAvg
|
||||
.where((entry) =>
|
||||
entry.date.isAfter(startDate) && entry.date.isBefore(planEndDate))
|
||||
.where((entry) => entry.date.isAfter(startDate) && entry.date.isBefore(planEndDate))
|
||||
.toList();
|
||||
print('entriesInPeriod: ${entriesInPeriod.length}');
|
||||
if (entriesInPeriod.length < 2) {
|
||||
@@ -136,8 +132,7 @@ class NutritionalPlansList extends StatelessWidget {
|
||||
Localizations.localeOf(context).languageCode,
|
||||
).format(currentPlan.startDate)} (open ended)',
|
||||
),
|
||||
_buildWeightChangeInfo(context, currentPlan.startDate,
|
||||
currentPlan.endDate),
|
||||
_buildWeightChangeInfo(context, currentPlan.startDate, currentPlan.endDate),
|
||||
],
|
||||
),
|
||||
trailing: Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
@@ -158,35 +153,29 @@ class NutritionalPlansList extends StatelessWidget {
|
||||
actions: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
MaterialLocalizations.of(context)
|
||||
.cancelButtonLabel,
|
||||
MaterialLocalizations.of(context).cancelButtonLabel,
|
||||
),
|
||||
onPressed: () =>
|
||||
Navigator.of(contextDialog).pop(),
|
||||
onPressed: () => Navigator.of(contextDialog).pop(),
|
||||
),
|
||||
TextButton(
|
||||
child: Text(
|
||||
AppLocalizations.of(context).delete,
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).colorScheme.error,
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
// Confirmed, delete the plan
|
||||
_nutritionProvider
|
||||
.deletePlan(currentPlan.id!);
|
||||
_nutritionProvider.deletePlan(currentPlan.id!);
|
||||
|
||||
// Close the popup
|
||||
Navigator.of(contextDialog).pop();
|
||||
|
||||
// and inform the user
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
AppLocalizations.of(context)
|
||||
.successfullyDeleted,
|
||||
AppLocalizations.of(context).successfullyDeleted,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -35,8 +35,7 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -256,14 +255,12 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i3.Future<_i6.Uint8List>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -43,8 +43,7 @@ import 'package:wger/providers/user.dart' as _i22;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -54,8 +53,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseDatabase_1 extends _i1.SmartFake
|
||||
implements _i3.ExerciseDatabase {
|
||||
class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase {
|
||||
_FakeExerciseDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -75,8 +73,7 @@ class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_3 extends _i1.SmartFake
|
||||
implements _i5.ExerciseCategory {
|
||||
class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory {
|
||||
_FakeExerciseCategory_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -116,8 +113,7 @@ class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_7 extends _i1.SmartFake
|
||||
implements _i9.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_7 extends _i1.SmartFake implements _i9.IngredientDatabase {
|
||||
_FakeIngredientDatabase_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -127,8 +123,7 @@ class _FakeIngredientDatabase_7 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_8 extends _i1.SmartFake
|
||||
implements _i10.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_8 extends _i1.SmartFake implements _i10.NutritionalPlan {
|
||||
_FakeNutritionalPlan_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -168,8 +163,7 @@ class _FakeIngredient_11 extends _i1.SmartFake implements _i13.Ingredient {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSharedPreferencesAsync_12 extends _i1.SmartFake
|
||||
implements _i14.SharedPreferencesAsync {
|
||||
class _FakeSharedPreferencesAsync_12 extends _i1.SmartFake implements _i14.SharedPreferencesAsync {
|
||||
_FakeSharedPreferencesAsync_12(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -306,8 +300,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExercises,
|
||||
newFilteredExercises,
|
||||
@@ -498,8 +491,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
@@ -533,8 +525,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<_i4.Exercise>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
@@ -580,8 +571,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateExerciseCache,
|
||||
[database],
|
||||
@@ -591,8 +581,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
@@ -602,8 +591,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
@@ -613,8 +601,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
@@ -624,8 +611,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
@@ -692,8 +678,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i20.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -803,14 +788,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8(
|
||||
returnValue: _i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -820,14 +803,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i18.Future<_i10.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i18.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8(
|
||||
returnValue: _i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -837,14 +818,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i18.Future<_i10.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i18.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue:
|
||||
_i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8(
|
||||
returnValue: _i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -949,8 +928,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i18.Future<_i12.MealItem>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> deleteMealItem(_i12.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> deleteMealItem(_i12.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -1020,8 +998,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i18.Future<List<_i21.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i18.Future<_i13.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<_i13.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -1083,8 +1060,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i18.Future<void>);
|
||||
|
||||
@override
|
||||
_i18.Future<void> fetchAndSetLogs(_i10.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<void> fetchAndSetLogs(_i10.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
@@ -1325,8 +1301,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -1397,8 +1372,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i18.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i18.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i18.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -1414,8 +1388,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i18.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i18.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i18.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -1448,15 +1421,13 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
// ignore: must_be_immutable
|
||||
class MockSharedPreferencesAsync extends _i1.Mock
|
||||
implements _i14.SharedPreferencesAsync {
|
||||
class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferencesAsync {
|
||||
MockSharedPreferencesAsync() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i18.Future<Set<String>> getKeys({Set<String>? allowList}) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<Set<String>> getKeys({Set<String>? allowList}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getKeys,
|
||||
[],
|
||||
@@ -1466,15 +1437,13 @@ class MockSharedPreferencesAsync extends _i1.Mock
|
||||
) as _i18.Future<Set<String>>);
|
||||
|
||||
@override
|
||||
_i18.Future<Map<String, Object?>> getAll({Set<String>? allowList}) =>
|
||||
(super.noSuchMethod(
|
||||
_i18.Future<Map<String, Object?>> getAll({Set<String>? allowList}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAll,
|
||||
[],
|
||||
{#allowList: allowList},
|
||||
),
|
||||
returnValue:
|
||||
_i18.Future<Map<String, Object?>>.value(<String, Object?>{}),
|
||||
returnValue: _i18.Future<Map<String, Object?>>.value(<String, Object?>{}),
|
||||
) as _i18.Future<Map<String, Object?>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -39,8 +39,7 @@ import 'package:wger/providers/user.dart' as _i17;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -90,8 +89,7 @@ class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSharedPreferencesAsync_5 extends _i1.SmartFake
|
||||
implements _i7.SharedPreferencesAsync {
|
||||
class _FakeSharedPreferencesAsync_5 extends _i1.SmartFake implements _i7.SharedPreferencesAsync {
|
||||
_FakeSharedPreferencesAsync_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -101,8 +99,7 @@ class _FakeSharedPreferencesAsync_5 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseDatabase_6 extends _i1.SmartFake
|
||||
implements _i8.ExerciseDatabase {
|
||||
class _FakeExerciseDatabase_6 extends _i1.SmartFake implements _i8.ExerciseDatabase {
|
||||
_FakeExerciseDatabase_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -112,8 +109,7 @@ class _FakeExerciseDatabase_6 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake
|
||||
implements _i9.ExerciseCategory {
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i9.ExerciseCategory {
|
||||
_FakeExerciseCategory_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -156,8 +152,7 @@ class _FakeLanguage_10 extends _i1.SmartFake implements _i12.Language {
|
||||
/// A class which mocks [AddExerciseProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockAddExerciseProvider extends _i1.Mock
|
||||
implements _i13.AddExerciseProvider {
|
||||
class MockAddExerciseProvider extends _i1.Mock implements _i13.AddExerciseProvider {
|
||||
MockAddExerciseProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -446,8 +441,7 @@ class MockAddExerciseProvider extends _i1.Mock
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<_i4.Translation> addExerciseTranslation(
|
||||
_i4.Translation? exercise) =>
|
||||
_i15.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExerciseTranslation,
|
||||
@@ -761,8 +755,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i3.Exercise>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
set filteredExercises(List<_i3.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExercises,
|
||||
newFilteredExercises,
|
||||
@@ -953,8 +946,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<_i3.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<_i3.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
@@ -988,8 +980,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<_i3.Exercise>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
@@ -1035,8 +1026,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> updateExerciseCache(_i8.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<void> updateExerciseCache(_i8.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateExerciseCache,
|
||||
[database],
|
||||
@@ -1046,8 +1036,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> fetchAndSetMuscles(_i8.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<void> fetchAndSetMuscles(_i8.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
@@ -1057,8 +1046,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> fetchAndSetCategories(_i8.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<void> fetchAndSetCategories(_i8.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
@@ -1068,8 +1056,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> fetchAndSetLanguages(_i8.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<void> fetchAndSetLanguages(_i8.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
@@ -1079,8 +1066,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
) as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> fetchAndSetEquipments(_i8.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i15.Future<void> fetchAndSetEquipments(_i8.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
|
||||
@@ -30,8 +30,7 @@ import 'package:wger/providers/exercises.dart' as _i9;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -41,8 +40,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseDatabase_1 extends _i1.SmartFake
|
||||
implements _i3.ExerciseDatabase {
|
||||
class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase {
|
||||
_FakeExerciseDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -62,8 +60,7 @@ class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_3 extends _i1.SmartFake
|
||||
implements _i5.ExerciseCategory {
|
||||
class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory {
|
||||
_FakeExerciseCategory_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -190,8 +187,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExercises,
|
||||
newFilteredExercises,
|
||||
@@ -382,8 +378,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
@@ -417,8 +412,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<_i4.Exercise>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
@@ -464,8 +458,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateExerciseCache,
|
||||
[database],
|
||||
@@ -475,8 +468,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
@@ -486,8 +478,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
@@ -497,8 +488,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
@@ -508,8 +498,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i10.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
|
||||
@@ -196,8 +196,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -268,8 +267,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -285,8 +283,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -196,8 +196,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -268,8 +267,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -285,8 +283,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -26,8 +26,7 @@ import 'package:wger/providers/measurement.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -37,8 +36,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake
|
||||
implements _i3.MeasurementCategory {
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
|
||||
_FakeMeasurementCategory_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -51,8 +49,7 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake
|
||||
/// A class which mocks [MeasurementProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockMeasurementProvider extends _i1.Mock
|
||||
implements _i4.MeasurementProvider {
|
||||
class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvider {
|
||||
MockMeasurementProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -133,8 +130,7 @@ class MockMeasurementProvider extends _i1.Mock
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addCategory,
|
||||
[category],
|
||||
|
||||
@@ -109,8 +109,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -181,8 +180,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -198,8 +196,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -30,8 +30,7 @@ import 'package:wger/providers/nutrition.dart' as _i8;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -41,8 +40,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake
|
||||
implements _i3.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
|
||||
_FakeIngredientDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -52,8 +50,7 @@ class _FakeIngredientDatabase_1 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake
|
||||
implements _i4.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
|
||||
_FakeNutritionalPlan_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -96,8 +93,7 @@ class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i8.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -207,14 +203,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -224,14 +218,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -241,14 +233,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -353,8 +343,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<_i6.MealItem>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -424,8 +413,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<List<_i10.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -487,8 +475,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -61,15 +61,13 @@ void main() {
|
||||
navigatorKey: key,
|
||||
home: Scaffold(body: PlanForm(plan)),
|
||||
routes: {
|
||||
NutritionalPlanScreen.routeName: (ctx) =>
|
||||
const NutritionalPlanScreen(),
|
||||
NutritionalPlanScreen.routeName: (ctx) => const NutritionalPlanScreen(),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
testWidgets('Test the widgets on the nutritional plan form',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Test the widgets on the nutritional plan form', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen(plan1));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -78,8 +76,7 @@ void main() {
|
||||
expect(find.byKey(const Key(SUBMIT_BUTTON_KEY_NAME)), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Test editing an existing nutritional plan',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Test editing an existing nutritional plan', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen(plan1));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -88,8 +85,7 @@ void main() {
|
||||
findsOneWidget,
|
||||
reason: 'Description of existing nutritional plan is filled in',
|
||||
);
|
||||
await tester.enterText(
|
||||
find.byKey(const Key('field-description')), 'New description');
|
||||
await tester.enterText(find.byKey(const Key('field-description')), 'New description');
|
||||
await tester.tap(find.byKey(const Key(SUBMIT_BUTTON_KEY_NAME)));
|
||||
|
||||
// Correct method was called
|
||||
@@ -110,15 +106,12 @@ void main() {
|
||||
//);
|
||||
});
|
||||
|
||||
testWidgets('Test creating a new nutritional plan',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Test creating a new nutritional plan', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen(plan2));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(''), findsOneWidget,
|
||||
reason: 'New nutritional plan has no description');
|
||||
await tester.enterText(
|
||||
find.byKey(const Key('field-description')), 'New cool plan');
|
||||
expect(find.text(''), findsOneWidget, reason: 'New nutritional plan has no description');
|
||||
await tester.enterText(find.byKey(const Key('field-description')), 'New cool plan');
|
||||
await tester.tap(find.byKey(const Key(SUBMIT_BUTTON_KEY_NAME)));
|
||||
|
||||
// Correct method was called
|
||||
|
||||
@@ -30,8 +30,7 @@ import 'package:wger/providers/nutrition.dart' as _i8;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -41,8 +40,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake
|
||||
implements _i3.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
|
||||
_FakeIngredientDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -52,8 +50,7 @@ class _FakeIngredientDatabase_1 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake
|
||||
implements _i4.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
|
||||
_FakeNutritionalPlan_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -96,8 +93,7 @@ class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i8.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -207,14 +203,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -224,14 +218,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -241,14 +233,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -353,8 +343,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<_i6.MealItem>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -424,8 +413,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<List<_i10.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -487,8 +475,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -46,8 +46,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
});
|
||||
test('Test NutritionalPlan.nutritionalValues based on 3 macros and energy',
|
||||
() {
|
||||
test('Test NutritionalPlan.nutritionalValues based on 3 macros and energy', () {
|
||||
expect(
|
||||
NutritionalPlan(
|
||||
description: '3 macros and energy defined',
|
||||
@@ -66,8 +65,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
});
|
||||
test('Test NutritionalPlan.nutritionalValues based on 2 macros and energy',
|
||||
() {
|
||||
test('Test NutritionalPlan.nutritionalValues based on 2 macros and energy', () {
|
||||
expect(
|
||||
NutritionalPlan(
|
||||
description: '2 macros and energy defined',
|
||||
@@ -106,14 +104,12 @@ void main() {
|
||||
|
||||
test('Test the nutritionalValues method for meals', () {
|
||||
final meal = plan.meals.first;
|
||||
final values = NutritionalValues.values(
|
||||
518.75, 5.75, 17.5, 3.5, 29.0, 13.75, 49.5, 0.5);
|
||||
final values = NutritionalValues.values(518.75, 5.75, 17.5, 3.5, 29.0, 13.75, 49.5, 0.5);
|
||||
expect(meal.plannedNutritionalValues, values);
|
||||
});
|
||||
|
||||
test('Test that the getter returns all meal items for a plan', () {
|
||||
expect(plan.dedupMealItems,
|
||||
plan.meals[0].mealItems + plan.meals[1].mealItems);
|
||||
expect(plan.dedupMealItems, plan.meals[0].mealItems + plan.meals[1].mealItems);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -69,8 +69,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i3.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -125,8 +124,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -197,8 +195,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -214,8 +211,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -313,8 +309,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -395,8 +390,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> applicationUpdateRequired([String? version]) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<bool> applicationUpdateRequired([String? version]) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#applicationUpdateRequired,
|
||||
[version],
|
||||
@@ -424,8 +418,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
#locale: locale,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
|
||||
returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
|
||||
) as _i5.Future<_i2.LoginActions>);
|
||||
|
||||
@override
|
||||
@@ -445,8 +438,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
apiToken,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
|
||||
returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
|
||||
) as _i5.Future<_i2.LoginActions>);
|
||||
|
||||
@override
|
||||
@@ -747,14 +739,12 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
) as _i5.Future<_i10.Uint8List>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -91,8 +91,7 @@ void main() {
|
||||
);
|
||||
}
|
||||
|
||||
testWidgets('Test the widgets on the nutritional plans screen',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Test the widgets on the nutritional plans screen', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen());
|
||||
|
||||
//debugDumpApp();
|
||||
@@ -101,8 +100,7 @@ void main() {
|
||||
expect(find.byType(ListTile), findsNWidgets(2));
|
||||
});
|
||||
|
||||
testWidgets('Test deleting an item using the Delete button',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Test deleting an item using the Delete button', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen());
|
||||
|
||||
await tester.tap(find.byIcon(Icons.delete).first);
|
||||
@@ -118,8 +116,7 @@ void main() {
|
||||
expect(find.byType(ListTile), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Test the form on the nutritional plan screen',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Test the form on the nutritional plan screen', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen());
|
||||
|
||||
expect(find.byType(PlanForm), findsNothing);
|
||||
@@ -128,16 +125,14 @@ void main() {
|
||||
expect(find.byType(PlanForm), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Tests the localization of dates - EN',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Tests the localization of dates - EN', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen());
|
||||
|
||||
expect(find.text('1/1/2021'), findsOneWidget);
|
||||
expect(find.text('1/10/2021'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Tests the localization of dates - DE',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('Tests the localization of dates - DE', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createHomeScreen(locale: 'de'));
|
||||
|
||||
expect(find.text('1.1.2021'), findsOneWidget);
|
||||
|
||||
@@ -69,8 +69,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -149,8 +148,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -231,8 +229,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> applicationUpdateRequired([String? version]) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<bool> applicationUpdateRequired([String? version]) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#applicationUpdateRequired,
|
||||
[version],
|
||||
@@ -260,8 +257,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
#locale: locale,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
|
||||
returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
|
||||
) as _i5.Future<_i3.LoginActions>);
|
||||
|
||||
@override
|
||||
@@ -281,8 +277,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
apiToken,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
|
||||
returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
|
||||
) as _i5.Future<_i3.LoginActions>);
|
||||
|
||||
@override
|
||||
@@ -418,8 +413,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -490,8 +484,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -507,8 +500,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -747,14 +739,12 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i5.Future<_i10.Uint8List>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -35,8 +35,7 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -256,14 +255,12 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i3.Future<_i6.Uint8List>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue:
|
||||
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -26,15 +26,13 @@ import 'package:shared_preferences/src/shared_preferences_async.dart' as _i2;
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
// ignore: must_be_immutable
|
||||
class MockSharedPreferencesAsync extends _i1.Mock
|
||||
implements _i2.SharedPreferencesAsync {
|
||||
class MockSharedPreferencesAsync extends _i1.Mock implements _i2.SharedPreferencesAsync {
|
||||
MockSharedPreferencesAsync() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Future<Set<String>> getKeys({Set<String>? allowList}) =>
|
||||
(super.noSuchMethod(
|
||||
_i3.Future<Set<String>> getKeys({Set<String>? allowList}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getKeys,
|
||||
[],
|
||||
@@ -44,15 +42,13 @@ class MockSharedPreferencesAsync extends _i1.Mock
|
||||
) as _i3.Future<Set<String>>);
|
||||
|
||||
@override
|
||||
_i3.Future<Map<String, Object?>> getAll({Set<String>? allowList}) =>
|
||||
(super.noSuchMethod(
|
||||
_i3.Future<Map<String, Object?>> getAll({Set<String>? allowList}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAll,
|
||||
[],
|
||||
{#allowList: allowList},
|
||||
),
|
||||
returnValue:
|
||||
_i3.Future<Map<String, Object?>>.value(<String, Object?>{}),
|
||||
returnValue: _i3.Future<Map<String, Object?>>.value(<String, Object?>{}),
|
||||
) as _i3.Future<Map<String, Object?>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -72,8 +72,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
implements _i4.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -83,8 +82,7 @@ class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseDatabase_5 extends _i1.SmartFake
|
||||
implements _i5.ExerciseDatabase {
|
||||
class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase {
|
||||
_FakeExerciseDatabase_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -104,8 +102,7 @@ class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake
|
||||
implements _i7.ExerciseCategory {
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory {
|
||||
_FakeExerciseCategory_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -190,8 +187,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -262,8 +258,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -279,8 +274,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -396,8 +390,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExercises,
|
||||
newFilteredExercises,
|
||||
@@ -588,8 +581,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
@@ -623,8 +615,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
@@ -670,8 +661,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateExerciseCache,
|
||||
[database],
|
||||
@@ -681,8 +671,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
@@ -692,8 +681,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
@@ -703,8 +691,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
@@ -714,8 +701,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -109,8 +109,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -181,8 +180,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -198,8 +196,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -72,8 +72,7 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
implements _i4.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -83,8 +82,7 @@ class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseDatabase_5 extends _i1.SmartFake
|
||||
implements _i5.ExerciseDatabase {
|
||||
class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase {
|
||||
_FakeExerciseDatabase_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -104,8 +102,7 @@ class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake
|
||||
implements _i7.ExerciseCategory {
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory {
|
||||
_FakeExerciseCategory_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -190,8 +187,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -262,8 +258,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -279,8 +274,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -396,8 +390,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExercises,
|
||||
newFilteredExercises,
|
||||
@@ -588,8 +581,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
@@ -623,8 +615,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
@@ -670,8 +661,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateExerciseCache,
|
||||
[database],
|
||||
@@ -681,8 +671,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
@@ -692,8 +681,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
@@ -703,8 +691,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
@@ -714,8 +701,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
|
||||
@@ -109,8 +109,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -181,8 +180,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -198,8 +196,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -35,8 +35,7 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -56,8 +55,7 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -117,8 +115,7 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -210,8 +207,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
|
||||
super.noSuchMethod(
|
||||
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#repetitionUnits,
|
||||
repetitionUnits,
|
||||
@@ -327,8 +323,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<void> setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
@@ -338,8 +333,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -354,8 +348,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -370,8 +363,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -717,14 +709,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
) as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
@@ -740,8 +730,7 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
routineId,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
@@ -754,14 +743,12 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editSession,
|
||||
|
||||
@@ -109,8 +109,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -181,8 +180,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -198,8 +196,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -109,8 +109,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -181,8 +180,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -198,8 +196,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -36,8 +36,7 @@ import 'package:wger/providers/user.dart' as _i13;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -57,8 +56,7 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake
|
||||
implements _i4.SharedPreferencesAsync {
|
||||
class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake implements _i4.SharedPreferencesAsync {
|
||||
_FakeSharedPreferencesAsync_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -68,8 +66,7 @@ class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_3 extends _i1.SmartFake
|
||||
implements _i5.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_3 extends _i1.SmartFake implements _i5.IngredientDatabase {
|
||||
_FakeIngredientDatabase_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -79,8 +76,7 @@ class _FakeIngredientDatabase_3 extends _i1.SmartFake
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_4 extends _i1.SmartFake
|
||||
implements _i6.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_4 extends _i1.SmartFake implements _i6.NutritionalPlan {
|
||||
_FakeNutritionalPlan_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -123,8 +119,7 @@ class _FakeIngredient_7 extends _i1.SmartFake implements _i9.Ingredient {
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightProvider extends _i1.Mock
|
||||
implements _i10.BodyWeightProvider {
|
||||
class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider {
|
||||
MockBodyWeightProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -184,26 +179,22 @@ class MockBodyWeightProvider extends _i1.Mock
|
||||
) as _i3.WeightEntry);
|
||||
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
)) as _i3.WeightEntry?);
|
||||
|
||||
@override
|
||||
_i11.Future<List<_i3.WeightEntry>> fetchAndSetEntries() =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<List<_i3.WeightEntry>> fetchAndSetEntries() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
returnValue: _i11.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i11.Future<List<_i3.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
@@ -427,8 +418,7 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i16.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -538,14 +528,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4(
|
||||
returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -555,14 +543,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i11.Future<_i6.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4(
|
||||
returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -572,14 +558,12 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i11.Future<_i6.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue:
|
||||
_i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4(
|
||||
returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -684,8 +668,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i11.Future<_i8.MealItem>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> deleteMealItem(_i8.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> deleteMealItem(_i8.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -755,8 +738,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i11.Future<List<_i17.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i9.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<_i9.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -818,8 +800,7 @@ class MockNutritionPlansProvider extends _i1.Mock
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLogs(_i6.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetLogs(_i6.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -180,12 +180,9 @@ NutritionalPlan getNutritionalPlan() {
|
||||
plan.meals = [meal1, meal2];
|
||||
|
||||
// Add logs
|
||||
plan.diaryEntries
|
||||
.add(Log.fromMealItem(mealItem1, 1, 1, DateTime(2021, 6, 1)));
|
||||
plan.diaryEntries
|
||||
.add(Log.fromMealItem(mealItem2, 1, 1, DateTime(2021, 6, 1)));
|
||||
plan.diaryEntries
|
||||
.add(Log.fromMealItem(mealItem3, 1, 1, DateTime(2021, 6, 10)));
|
||||
plan.diaryEntries.add(Log.fromMealItem(mealItem1, 1, 1, DateTime(2021, 6, 1)));
|
||||
plan.diaryEntries.add(Log.fromMealItem(mealItem2, 1, 1, DateTime(2021, 6, 1)));
|
||||
plan.diaryEntries.add(Log.fromMealItem(mealItem3, 1, 1, DateTime(2021, 6, 10)));
|
||||
|
||||
return plan;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user