Postmerge fixes

This commit is contained in:
Roland Geider
2025-10-19 14:50:19 +02:00
parent 98f2fb0096
commit 54b40696da
57 changed files with 5221 additions and 3837 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,9 +7,7 @@ class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, In
@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>(
@@ -28,7 +26,9 @@ class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, In
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',
@@ -37,17 +37,13 @@ class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, In
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
@override
List<GeneratedColumn> get $columns => [id, data, lastFetched];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'ingredients';
@override
VerificationContext validateIntegrity(
Insertable<IngredientTable> instance, {
@@ -61,14 +57,20 @@ class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, In
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),
lastFetched.isAcceptableOrUnknown(
data['last_fetched']!,
_lastFetchedMeta,
),
);
} else if (isInserting) {
context.missing(_lastFetchedMeta);
@@ -78,13 +80,18 @@ class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, In
@override
Set<GeneratedColumn> get $primaryKey => const {};
@override
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'],
@@ -104,9 +111,11 @@ 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>{};
@@ -117,10 +126,17 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
}
IngredientsCompanion toCompanion(bool nullToAbsent) {
return IngredientsCompanion(id: Value(id), data: Value(data), lastFetched: Value(lastFetched));
return IngredientsCompanion(
id: Value(id),
data: Value(data),
lastFetched: Value(lastFetched),
);
}
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']),
@@ -128,7 +144,6 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
lastFetched: serializer.fromJson<DateTime>(json['lastFetched']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
@@ -144,7 +159,6 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
data: data ?? this.data,
lastFetched: lastFetched ?? this.lastFetched,
);
IngredientTable copyWithCompanion(IngredientsCompanion data) {
return IngredientTable(
id: data.id.present ? data.id.value : this.id,
@@ -165,7 +179,6 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
@override
int get hashCode => Object.hash(id, data, lastFetched);
@override
bool operator ==(Object other) =>
identical(this, other) ||
@@ -180,14 +193,12 @@ class IngredientsCompanion extends UpdateCompanion<IngredientTable> {
final Value<String> data;
final Value<DateTime> lastFetched;
final Value<int> rowid;
const IngredientsCompanion({
this.id = const Value.absent(),
this.data = const Value.absent(),
this.lastFetched = const Value.absent(),
this.rowid = const Value.absent(),
});
IngredientsCompanion.insert({
required int id,
required String data,
@@ -196,7 +207,6 @@ class IngredientsCompanion extends UpdateCompanion<IngredientTable> {
}) : id = Value(id),
data = Value(data),
lastFetched = Value(lastFetched);
static Insertable<IngredientTable> custom({
Expression<int>? id,
Expression<String>? data,
@@ -257,14 +267,11 @@ class IngredientsCompanion extends UpdateCompanion<IngredientTable> {
abstract class _$IngredientDatabase extends GeneratedDatabase {
_$IngredientDatabase(QueryExecutor e) : super(e);
$IngredientDatabaseManager get managers => $IngredientDatabaseManager(this);
late final $IngredientsTable ingredients = $IngredientsTable(this);
@override
Iterable<TableInfo<Table, Object?>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [ingredients];
}
@@ -292,15 +299,20 @@ class $$IngredientsTableFilterComposer extends Composer<_$IngredientDatabase, $I
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> {
@@ -311,15 +323,20 @@ class $$IngredientsTableOrderingComposer extends Composer<_$IngredientDatabase,
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
@@ -331,14 +348,15 @@ class $$IngredientsTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
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
@@ -359,8 +377,10 @@ class $$IngredientsTableTableManager
IngredientTable,
PrefetchHooks Function()
> {
$$IngredientsTableTableManager(_$IngredientDatabase db, $IngredientsTable table)
: super(
$$IngredientsTableTableManager(
_$IngredientDatabase db,
$IngredientsTable table,
) : super(
TableManagerState(
db: db,
table: table,
@@ -374,8 +394,12 @@ class $$IngredientsTableTableManager
Value<String> data = const Value.absent(),
Value<DateTime> lastFetched = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
IngredientsCompanion(id: id, data: data, lastFetched: lastFetched, rowid: rowid),
}) => IngredientsCompanion(
id: id,
data: data,
lastFetched: lastFetched,
rowid: rowid,
),
createCompanionCallback:
({
required int id,
@@ -412,9 +436,7 @@ typedef $$IngredientsTableProcessedTableManager =
class $IngredientDatabaseManager {
final _$IngredientDatabase _db;
$IngredientDatabaseManager(this._db);
$$IngredientsTableTableManager get ingredients =>
$$IngredientsTableTableManager(_db, _db.ingredients);
}

View File

@@ -22,7 +22,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart' as riverpod;
import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
import 'package:wger/core/locator.dart';
import 'package:wger/powersync.dart';
import 'package:wger/exceptions/http_exception.dart';
import 'package:wger/helpers/errors.dart';
import 'package:wger/helpers/shared_preferences.dart';

View File

@@ -8,7 +8,10 @@ part of 'category.dart';
ExerciseCategory _$ExerciseCategoryFromJson(Map<String, dynamic> json) {
$checkKeys(json, requiredKeys: const ['id', 'name']);
return ExerciseCategory(id: (json['id'] as num).toInt(), name: json['name'] as String);
return ExerciseCategory(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
);
}
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) => <String, dynamic>{

View File

@@ -38,7 +38,9 @@ Exercise _$ExerciseFromJson(Map<String, dynamic> json) {
.toList(),
category: json['categories'] == null
? null
: ExerciseCategory.fromJson(json['categories'] as Map<String, dynamic>),
: 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()

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,9 @@ _ExerciseBaseData _$ExerciseBaseDataFromJson(Map<String, dynamic> json) => _Exer
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(),
@@ -56,34 +58,39 @@ Map<String, dynamic> _$ExerciseBaseDataToJson(_ExerciseBaseData instance) => <St
'total_authors_history': instance.authorsGlobal,
};
_ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(Map<String, dynamic> json) =>
_ExerciseSearchDetails(
translationId: (json['id'] as num).toInt(),
exerciseId: (json['base_id'] as num).toInt(),
name: json['name'] as String,
category: json['category'] as String,
image: json['image'] as String?,
imageThumbnail: json['image_thumbnail'] as String?,
);
_ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(
Map<String, dynamic> json,
) => _ExerciseSearchDetails(
translationId: (json['id'] as num).toInt(),
exerciseId: (json['base_id'] as num).toInt(),
name: json['name'] as String,
category: json['category'] as String,
image: json['image'] as String?,
imageThumbnail: json['image_thumbnail'] as String?,
);
Map<String, dynamic> _$ExerciseSearchDetailsToJson(_ExerciseSearchDetails instance) =>
<String, dynamic>{
'id': instance.translationId,
'base_id': instance.exerciseId,
'name': instance.name,
'category': instance.category,
'image': instance.image,
'image_thumbnail': instance.imageThumbnail,
};
Map<String, dynamic> _$ExerciseSearchDetailsToJson(
_ExerciseSearchDetails instance,
) => <String, dynamic>{
'id': instance.translationId,
'base_id': instance.exerciseId,
'name': instance.name,
'category': instance.category,
'image': instance.image,
'image_thumbnail': instance.imageThumbnail,
};
_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) =>
<String, dynamic>{'value': instance.value, 'data': instance.data};
Map<String, dynamic> _$ExerciseSearchEntryToJson(
_ExerciseSearchEntry instance,
) => <String, dynamic>{'value': instance.value, 'data': instance.data};
_ExerciseApiSearch _$ExerciseApiSearchFromJson(Map<String, dynamic> json) => _ExerciseApiSearch(
suggestions: (json['suggestions'] as List<dynamic>)

File diff suppressed because it is too large Load Diff

View File

@@ -6,17 +6,21 @@ part of 'exercise_submission.dart';
// JsonSerializableGenerator
// **************************************************************************
_ExerciseAliasSubmissionApi _$ExerciseAliasSubmissionApiFromJson(Map<String, dynamic> json) =>
_ExerciseAliasSubmissionApi(alias: json['alias'] as String);
_ExerciseAliasSubmissionApi _$ExerciseAliasSubmissionApiFromJson(
Map<String, dynamic> json,
) => _ExerciseAliasSubmissionApi(alias: json['alias'] as String);
Map<String, dynamic> _$ExerciseAliasSubmissionApiToJson(_ExerciseAliasSubmissionApi instance) =>
<String, dynamic>{'alias': instance.alias};
Map<String, dynamic> _$ExerciseAliasSubmissionApiToJson(
_ExerciseAliasSubmissionApi instance,
) => <String, dynamic>{'alias': instance.alias};
_ExerciseCommentSubmissionApi _$ExerciseCommentSubmissionApiFromJson(Map<String, dynamic> json) =>
_ExerciseCommentSubmissionApi(alias: json['alias'] as String);
_ExerciseCommentSubmissionApi _$ExerciseCommentSubmissionApiFromJson(
Map<String, dynamic> json,
) => _ExerciseCommentSubmissionApi(alias: json['alias'] as String);
Map<String, dynamic> _$ExerciseCommentSubmissionApiToJson(_ExerciseCommentSubmissionApi instance) =>
<String, dynamic>{'alias': instance.alias};
Map<String, dynamic> _$ExerciseCommentSubmissionApiToJson(
_ExerciseCommentSubmissionApi instance,
) => <String, dynamic>{'alias': instance.alias};
_ExerciseTranslationSubmissionApi _$ExerciseTranslationSubmissionApiFromJson(
Map<String, dynamic> json,
@@ -27,12 +31,18 @@ _ExerciseTranslationSubmissionApi _$ExerciseTranslationSubmissionApiFromJson(
author: json['license_author'] as String,
aliases:
(json['aliases'] as List<dynamic>?)
?.map((e) => ExerciseAliasSubmissionApi.fromJson(e as Map<String, dynamic>))
?.map(
(e) => ExerciseAliasSubmissionApi.fromJson(e as Map<String, dynamic>),
)
.toList() ??
const [],
comments:
(json['comments'] as List<dynamic>?)
?.map((e) => ExerciseCommentSubmissionApi.fromJson(e as Map<String, dynamic>))
?.map(
(e) => ExerciseCommentSubmissionApi.fromJson(
e as Map<String, dynamic>,
),
)
.toList() ??
const [],
);
@@ -48,30 +58,36 @@ Map<String, dynamic> _$ExerciseTranslationSubmissionApiToJson(
'comments': instance.comments,
};
_ExerciseSubmissionApi _$ExerciseSubmissionApiFromJson(Map<String, dynamic> json) =>
_ExerciseSubmissionApi(
category: (json['category'] as num).toInt(),
muscles: (json['muscles'] as List<dynamic>).map((e) => (e as num).toInt()).toList(),
musclesSecondary: (json['muscles_secondary'] as List<dynamic>)
.map((e) => (e as num).toInt())
.toList(),
equipment: (json['equipment'] as List<dynamic>).map((e) => (e as num).toInt()).toList(),
author: json['license_author'] as String,
variation: (json['variation'] as num?)?.toInt(),
variationConnectTo: (json['variations_connect_to'] as num?)?.toInt(),
translations: (json['translations'] as List<dynamic>)
.map((e) => ExerciseTranslationSubmissionApi.fromJson(e as Map<String, dynamic>))
.toList(),
);
_ExerciseSubmissionApi _$ExerciseSubmissionApiFromJson(
Map<String, dynamic> json,
) => _ExerciseSubmissionApi(
category: (json['category'] as num).toInt(),
muscles: (json['muscles'] as List<dynamic>).map((e) => (e as num).toInt()).toList(),
musclesSecondary: (json['muscles_secondary'] as List<dynamic>)
.map((e) => (e as num).toInt())
.toList(),
equipment: (json['equipment'] as List<dynamic>).map((e) => (e as num).toInt()).toList(),
author: json['license_author'] as String,
variation: (json['variation'] as num?)?.toInt(),
variationConnectTo: (json['variations_connect_to'] as num?)?.toInt(),
translations: (json['translations'] as List<dynamic>)
.map(
(e) => ExerciseTranslationSubmissionApi.fromJson(
e as Map<String, dynamic>,
),
)
.toList(),
);
Map<String, dynamic> _$ExerciseSubmissionApiToJson(_ExerciseSubmissionApi instance) =>
<String, dynamic>{
'category': instance.category,
'muscles': instance.muscles,
'muscles_secondary': instance.musclesSecondary,
'equipment': instance.equipment,
'license_author': instance.author,
'variation': instance.variation,
'variations_connect_to': instance.variationConnectTo,
'translations': instance.translations,
};
Map<String, dynamic> _$ExerciseSubmissionApiToJson(
_ExerciseSubmissionApi instance,
) => <String, dynamic>{
'category': instance.category,
'muscles': instance.muscles,
'muscles_secondary': instance.musclesSecondary,
'equipment': instance.equipment,
'license_author': instance.author,
'variation': instance.variation,
'variations_connect_to': instance.variationConnectTo,
'translations': instance.translations,
};

View File

@@ -9,7 +9,15 @@ 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(),

View File

@@ -20,7 +20,9 @@ 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,

View File

@@ -50,7 +50,9 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
: IngredientImage.fromJson(json['image'] as Map<String, dynamic>),
thumbnails: json['thumbnails'] == null
? null
: IngredientImageThumbnails.fromJson(json['thumbnails'] as Map<String, dynamic>),
: IngredientImageThumbnails.fromJson(
json['thumbnails'] as Map<String, dynamic>,
),
);
}

View File

@@ -6,7 +6,9 @@ part of 'ingredient_image_thumbnails.dart';
// JsonSerializableGenerator
// **************************************************************************
IngredientImageThumbnails _$IngredientImageThumbnailsFromJson(Map<String, dynamic> json) {
IngredientImageThumbnails _$IngredientImageThumbnailsFromJson(
Map<String, dynamic> json,
) {
$checkKeys(
json,
requiredKeys: const [
@@ -28,12 +30,13 @@ IngredientImageThumbnails _$IngredientImageThumbnailsFromJson(Map<String, dynami
);
}
Map<String, dynamic> _$IngredientImageThumbnailsToJson(IngredientImageThumbnails instance) =>
<String, dynamic>{
'small': instance.small,
'small_cropped': instance.smallCropped,
'medium': instance.medium,
'medium_cropped': instance.mediumCropped,
'large': instance.large,
'large_cropped': instance.largeCropped,
};
Map<String, dynamic> _$IngredientImageThumbnailsToJson(
IngredientImageThumbnails instance,
) => <String, dynamic>{
'small': instance.small,
'small_cropped': instance.smallCropped,
'medium': instance.medium,
'medium_cropped': instance.mediumCropped,
'large': instance.large,
'large_cropped': instance.largeCropped,
};

View File

@@ -7,21 +7,27 @@ part of 'ingredient_weight_unit.dart';
// **************************************************************************
IngredientWeightUnit _$IngredientWeightUnitFromJson(Map<String, dynamic> json) {
$checkKeys(json, requiredKeys: const ['id', 'weight_unit', 'ingredient', 'grams', 'amount']);
$checkKeys(
json,
requiredKeys: const ['id', 'weight_unit', 'ingredient', 'grams', 'amount'],
);
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) =>
<String, dynamic>{
'id': instance.id,
'weight_unit': instance.weightUnit,
'ingredient': instance.ingredient,
'grams': instance.grams,
'amount': instance.amount,
};
Map<String, dynamic> _$IngredientWeightUnitToJson(
IngredientWeightUnit instance,
) => <String, dynamic>{
'id': instance.id,
'weight_unit': instance.weightUnit,
'ingredient': instance.ingredient,
'grams': instance.grams,
'amount': instance.amount,
};

View File

@@ -118,7 +118,7 @@ class Log {
return results.map((r) => Log.fromRow(r)).toList();
}
/*
/*
Future<void> delete() async {
await db.execute('DELETE FROM $logItemsTable WHERE id = ?', [id]);
}

View File

@@ -7,10 +7,10 @@ part of 'meal.dart';
// **************************************************************************
Meal _$MealFromJson(Map<String, dynamic> json) => Meal(
id: (json['id'] as num?)?.toInt(),
id: json['id'] as String?,
time: stringToTimeNull(json['time'] as String?),
name: json['name'] as String?,
)..planId = (json['plan'] as num).toInt();
)..planId = json['plan'] as String;
Map<String, dynamic> _$MealToJson(Meal instance) => <String, dynamic>{
'id': instance.id,

View File

@@ -39,7 +39,7 @@ class NutritionalPlan {
final _logger = Logger('NutritionalPlan Model');
@JsonKey(required: true)
int? id;
String? id;
@JsonKey(required: true)
late String description;
@@ -109,6 +109,8 @@ class NutritionalPlan {
id: row['id'],
description: row['description'],
creationDate: DateTime.parse(row['creation_date']),
startDate: row['start'] != null ? DateTime.parse(row['start']) : DateTime.now(),
endDate: row['end'] != null ? DateTime.parse(row['end']) : null,
onlyLogging: row['only_logging'] == 1,
goalEnergy: row['goal_energy'],
goalProtein: row['goal_protein'],
@@ -135,6 +137,8 @@ class NutritionalPlan {
id: id ?? this.id,
description: description ?? this.description,
creationDate: creationDate ?? this.creationDate,
startDate: startDate ?? this.startDate,
endDate: endDate ?? this.endDate,
onlyLogging: onlyLogging ?? this.onlyLogging,
goalEnergy: goalEnergy ?? this.goalEnergy,
goalProtein: goalProtein ?? this.goalProtein,

View File

@@ -10,6 +10,7 @@ NutritionalPlan _$NutritionalPlanFromJson(Map<String, dynamic> json) {
$checkKeys(
json,
requiredKeys: const [
'id',
'description',
'creation_date',
'start',

View File

@@ -9,7 +9,15 @@ 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(),

View File

@@ -9,7 +9,15 @@ 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(),

View File

@@ -8,7 +8,10 @@ part of 'weight_unit.dart';
WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
$checkKeys(json, requiredKeys: const ['id', 'name']);
return WeightUnit(id: (json['id'] as num).toInt(), name: json['name'] as String);
return WeightUnit(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
);
}
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{

View File

@@ -39,7 +39,7 @@ class DjangoConnector extends PowerSyncBackendConnector {
// final wgerSession = await apiClient.getWgerJWTToken();
final session = await apiClient.getPowersyncToken();
// note: we don't set userId and expires property here. not sure if needed
return PowerSyncCredentials(endpoint: this.powersyncUrl, token: session['token']);
return PowerSyncCredentials(endpoint: powersyncUrl, token: session['token']);
}
// Upload pending changes to Postgres via Django backend

View File

@@ -24,11 +24,8 @@ import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:wger/core/locator.dart';
import 'package:wger/database/ingredients/ingredients_database.dart';
import 'package:wger/exceptions/http_exception.dart';
import 'package:wger/exceptions/no_such_entry_exception.dart';
import 'package:wger/helpers/consts.dart';
import 'package:wger/models/nutrition/ingredient.dart';
import 'package:wger/models/nutrition/ingredient_image.dart';
import 'package:wger/models/nutrition/log.dart';
import 'package:wger/models/nutrition/meal.dart';
import 'package:wger/models/nutrition/meal_item.dart';
@@ -85,7 +82,7 @@ class NutritionPlansProvider with ChangeNotifier {
.sorted((a, b) => b.creationDate.compareTo(a.creationDate))
.firstOrNull;
}
/*
/*
NutritionalPlan findById(int id) {
return _plans.firstWhere(
(plan) => plan.id == id,
@@ -168,7 +165,7 @@ class NutritionPlansProvider with ChangeNotifier {
),
);
}
/*
/*
TODO implement:
ingredient.image = image;
mealItem.ingredient = ingredient;
@@ -188,11 +185,11 @@ TODO implement:
}
Future<void> editPlan(NutritionalPlan plan) async {
// TODO
// TODO
}
Future<void> deletePlan(String id) async {
// TODO
// TODO
}
/// Adds a meal to a plan
@@ -406,10 +403,11 @@ TODO implement:
}
/// Log custom ingredient to nutrition diary
Future<void> logIngredientToDiary(MealItem mealItem, int planId, [DateTime? dateTime]) async {
Future<void> logIngredientToDiary(MealItem mealItem, String planId, [DateTime? dateTime]) async {
print(
'DIETER logIngredientToDiary called ingredient=${mealItem.ingredientId}, planId=$planId, dateTime=$dateTime'
'DIETER logIngredientToDiary called ingredient=${mealItem.ingredientId}, planId=$planId, dateTime=$dateTime',
);
/*
final plan = findById(planId);
mealItem.ingredient = await fetchIngredient(mealItem.ingredientId);
final log = Log.fromMealItem(mealItem, plan.id!, null, dateTime);
@@ -417,6 +415,8 @@ TODO implement:
final data = await baseProvider.post(log.toJson(), baseProvider.makeUrl(_nutritionDiaryPath));
log.id = data['id'];
plan.diaryEntries.add(log);
*/
notifyListeners();
}

View File

@@ -19,8 +19,8 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:wger/models/muscle.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/models/muscle.dart';
import 'package:wger/widgets/core/app_bar.dart';
import 'package:wger/widgets/dashboard/calendar.dart';
import 'package:wger/widgets/dashboard/widgets/measurements.dart';

View File

@@ -136,7 +136,7 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
widget._logger.info('Loading routines, weight, measurements and gallery');
await Future.wait([
galleryProvider.fetchAndSetGallery(),
nutritionPlansProvider.fetchAndSetAllPlansSparse(),
// nutritionPlansProvider.fetchAndSetAllPlansSparse(),
routinesProvider.fetchAndSetAllRoutinesSparse(),
// routinesProvider.fetchAndSetAllRoutinesFull(),
weightProvider.fetchAndSetEntries(),
@@ -145,11 +145,11 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
//
// Current nutritional plan
widget._logger.info('Loading current nutritional plan');
if (nutritionPlansProvider.currentPlan != null) {
final plan = nutritionPlansProvider.currentPlan!;
await nutritionPlansProvider.fetchAndSetPlanFull(plan.id!);
}
// widget._logger.info('Loading current nutritional plan');
// if (nutritionPlansProvider.currentPlan != null) {
// final plan = nutritionPlansProvider.currentPlan!;
// await nutritionPlansProvider.fetchAndSetPlanFull(plan.id!);
// }
//
// Current routine

View File

@@ -28,12 +28,12 @@ import 'package:wger/widgets/nutrition/nutritional_diary_detail.dart';
/// Arguments passed to the form screen
class NutritionalDiaryArguments {
/// Nutritional plan
final String plan;
final String planId;
/// Date to show data for
final DateTime date;
const NutritionalDiaryArguments(this.plan, this.date);
const NutritionalDiaryArguments(this.planId, this.date);
}
class NutritionalDiaryScreen extends StatefulWidget {
@@ -55,8 +55,10 @@ class _NutritionalDiaryScreenState extends State<NutritionalDiaryScreen> {
final args = ModalRoute.of(context)!.settings.arguments as NutritionalDiaryArguments;
date = args.date;
final stream =
Provider.of<NutritionPlansProvider>(context, listen: false).watchNutritionPlan(args.plan);
final stream = Provider.of<NutritionPlansProvider>(
context,
listen: false,
).watchNutritionPlan(args.planId);
_subscription = stream.listen((plan) {
if (!context.mounted) {
return;

View File

@@ -79,141 +79,146 @@ class _NutritionalPlanScreenState extends State<NutritionalPlanScreen> {
floatingActionButton: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
FloatingActionButton(
heroTag: null,
tooltip: AppLocalizations.of(context).logIngredient,
onPressed: () {
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).logIngredient,
getIngredientLogForm(nutritionalPlan),
hasListView: true,
),
);
},
child: const SvgIcon(
icon: SvgIconData('assets/icons/ingredient-diary.svg'),
color: Colors.white,
if (_plan != null)
FloatingActionButton(
heroTag: null,
tooltip: AppLocalizations.of(context).logIngredient,
onPressed: () {
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).logIngredient,
getIngredientLogForm(_plan!),
hasListView: true,
),
);
},
child: const SvgIcon(
icon: SvgIconData('assets/icons/ingredient-diary.svg'),
color: Colors.white,
),
),
),
const SizedBox(width: 8),
FloatingActionButton(
heroTag: null,
tooltip: AppLocalizations.of(context).logMeal,
onPressed: () {
Navigator.of(context).pushNamed(
LogMealsScreen.routeName,
arguments: nutritionalPlan,
);
},
child: const SvgIcon(
icon: SvgIconData('assets/icons/meal-diary.svg'),
color: Colors.white,
if (_plan != null)
FloatingActionButton(
heroTag: null,
tooltip: AppLocalizations.of(context).logMeal,
onPressed: () {
Navigator.of(context).pushNamed(
LogMealsScreen.routeName,
arguments: _plan,
);
},
child: const SvgIcon(
icon: SvgIconData('assets/icons/meal-diary.svg'),
color: Colors.white,
),
),
),
],
),
body: CustomScrollView(
slivers: [
SliverAppBar(
foregroundColor: appBarForeground,
pinned: true,
iconTheme: const IconThemeData(color: appBarForeground),
actions: [
if (!nutritionalPlan.onlyLogging)
IconButton(
icon: const SvgIcon(
icon: SvgIconData('assets/icons/meal-add.svg'),
),
onPressed: () {
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).addMeal,
MealForm(nutritionalPlan.id!),
),
);
},
),
PopupMenuButton<NutritionalPlanOptions>(
icon: const Icon(Icons.more_vert, color: appBarForeground),
onSelected: (value) {
switch (value) {
case NutritionalPlanOptions.edit:
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).edit,
PlanForm(nutritionalPlan),
hasListView: true,
body: _plan == null
? const Text('plan not found')
: CustomScrollView(
slivers: [
SliverAppBar(
foregroundColor: appBarForeground,
pinned: true,
iconTheme: const IconThemeData(color: appBarForeground),
actions: [
if (!_plan!.onlyLogging)
IconButton(
icon: const SvgIcon(
icon: SvgIconData('assets/icons/meal-add.svg'),
),
);
break;
case NutritionalPlanOptions.delete:
Provider.of<NutritionPlansProvider>(
context,
listen: false,
).deletePlan(nutritionalPlan.id!);
Navigator.of(context).pop();
break;
}
},
itemBuilder: (BuildContext context) {
return [
PopupMenuItem<NutritionalPlanOptions>(
value: NutritionalPlanOptions.edit,
child: ListTile(
leading: const Icon(Icons.edit),
title: Text(AppLocalizations.of(context).edit),
onPressed: () {
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).addMeal,
MealForm(_plan!.id!),
),
);
},
),
),
const PopupMenuDivider(),
PopupMenuItem<NutritionalPlanOptions>(
value: NutritionalPlanOptions.delete,
child: ListTile(
leading: const Icon(Icons.delete),
title: Text(AppLocalizations.of(context).delete),
),
),
];
},
),
],
flexibleSpace: FlexibleSpaceBar(
titlePadding: const EdgeInsets.fromLTRB(56, 0, 56, 16),
title: Text(
nutritionalPlan.getLabel(context),
style: Theme.of(context).textTheme.titleLarge?.copyWith(color: appBarForeground),
),
),
),
FutureBuilder(
future: _loadFullPlan(context, nutritionalPlan.id!),
builder: (context, AsyncSnapshot<NutritionalPlan> snapshot) =>
snapshot.connectionState == ConnectionState.waiting
? SliverList(
delegate: SliverChildListDelegate(
[
const SizedBox(
height: 200,
child: Center(
child: CircularProgressIndicator(),
PopupMenuButton<NutritionalPlanOptions>(
icon: const Icon(Icons.more_vert, color: appBarForeground),
onSelected: (value) {
switch (value) {
case NutritionalPlanOptions.edit:
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).edit,
PlanForm(_plan),
hasListView: true,
),
);
break;
case NutritionalPlanOptions.delete:
Provider.of<NutritionPlansProvider>(
context,
listen: false,
).deletePlan(_plan!.id!);
Navigator.of(context).pop();
break;
}
},
itemBuilder: (BuildContext context) {
return [
PopupMenuItem<NutritionalPlanOptions>(
value: NutritionalPlanOptions.edit,
child: ListTile(
leading: const Icon(Icons.edit),
title: Text(AppLocalizations.of(context).edit),
),
),
),
],
const PopupMenuDivider(),
PopupMenuItem<NutritionalPlanOptions>(
value: NutritionalPlanOptions.delete,
child: ListTile(
leading: const Icon(Icons.delete),
title: Text(AppLocalizations.of(context).delete),
),
),
];
},
),
],
flexibleSpace: FlexibleSpaceBar(
titlePadding: const EdgeInsets.fromLTRB(56, 0, 56, 16),
title: Text(
_plan!.getLabel(context),
style: Theme.of(
context,
).textTheme.titleLarge?.copyWith(color: appBarForeground),
),
)
: Consumer<NutritionPlansProvider>(
builder: (context, value, child) =>
NutritionalPlanDetailWidget(nutritionalPlan),
),
),
],
),
),
FutureBuilder(
future: NutritionalPlan.read(_plan!.id!),
builder: (context, AsyncSnapshot<NutritionalPlan> snapshot) =>
snapshot.connectionState == ConnectionState.waiting
? SliverList(
delegate: SliverChildListDelegate(
[
const SizedBox(
height: 200,
child: Center(
child: CircularProgressIndicator(),
),
),
],
),
)
: Consumer<NutritionPlansProvider>(
builder: (context, value, child) => NutritionalPlanDetailWidget(_plan!),
),
),
],
),
);
}
}

View File

@@ -120,7 +120,7 @@ Widget getMealItemForm(
]) {
return IngredientForm(
// TODO we use planId 0 here cause we don't have one and we don't need it I think?
recent: recent.map((e) => Log.fromMealItem(e, "0", e.mealId)).toList(),
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);

View File

@@ -113,7 +113,7 @@ class NutritionalDiaryTable extends StatelessWidget {
return GestureDetector(
onTap: () => Navigator.of(context).pushNamed(
NutritionalDiaryScreen.routeName,
arguments: NutritionalDiaryArguments(plan, date),
arguments: NutritionalDiaryArguments(plan.id!, date),
),
child: element,
);

View File

@@ -138,8 +138,8 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
],
),
),
),
]),
],
),
);
}
}

View File

@@ -23,6 +23,7 @@ import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:wger/helpers/measurements.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/models/nutrition/nutritional_plan.dart';
import 'package:wger/providers/body_weight.dart';
import 'package:wger/providers/nutrition.dart';
import 'package:wger/providers/user.dart';
@@ -117,99 +118,98 @@ class _NutritionalPlansListState extends State<NutritionalPlansList> {
@override
Widget build(BuildContext context) {
return RefreshIndicator(
onRefresh: () => _nutritionProvider.fetchAndSetAllPlansSparse(),
child: _nutritionProvider.items.isEmpty
? const TextPrompt()
: ListView.builder(
padding: const EdgeInsets.all(10.0),
itemCount: _nutritionProvider.items.length,
itemBuilder: (context, index) {
final currentPlan = _nutritionProvider.items[index];
return Card(
child: ListTile(
onTap: () {
Navigator.of(context).pushNamed(
NutritionalPlanScreen.routeName,
arguments: currentPlan,
);
},
title: Text(currentPlan.getLabel(context)),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
currentPlan.endDate != null
? 'from ${DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).format(currentPlan.startDate)} to ${DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).format(currentPlan.endDate!)}'
: 'from ${DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).format(currentPlan.startDate)} (open ended)',
),
_buildWeightChangeInfo(context, currentPlan.startDate, currentPlan.endDate),
],
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
const VerticalDivider(),
IconButton(
icon: const Icon(Icons.delete),
tooltip: AppLocalizations.of(context).delete,
onPressed: () async {
// Delete the plan from DB
await showDialog(
context: context,
builder: (BuildContext contextDialog) {
return AlertDialog(
content: Text(
AppLocalizations.of(
context,
).confirmDelete(currentPlan.description),
final nutritionProvider = Provider.of<NutritionPlansProvider>(context);
return _plans.isEmpty
? const TextPrompt()
: ListView.builder(
padding: const EdgeInsets.all(10.0),
itemCount: _plans.length,
itemBuilder: (context, index) {
final currentPlan = _plans[index];
return Card(
child: ListTile(
onTap: () {
Navigator.of(context).pushNamed(
NutritionalPlanScreen.routeName,
arguments: currentPlan,
);
},
title: Text(currentPlan.getLabel(context)),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
currentPlan.endDate != null
? 'from ${DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).format(currentPlan.startDate)} to ${DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).format(currentPlan.endDate!)}'
: 'from ${DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).format(currentPlan.startDate)} (open ended)',
),
_buildWeightChangeInfo(context, currentPlan.startDate, currentPlan.endDate),
],
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
const VerticalDivider(),
IconButton(
icon: const Icon(Icons.delete),
tooltip: AppLocalizations.of(context).delete,
onPressed: () async {
// Delete the plan from DB
await showDialog(
context: context,
builder: (BuildContext contextDialog) {
return AlertDialog(
content: Text(
AppLocalizations.of(
context,
).confirmDelete(currentPlan.description),
),
actions: [
TextButton(
child: Text(
MaterialLocalizations.of(context).cancelButtonLabel,
),
onPressed: () => Navigator.of(contextDialog).pop(),
),
actions: [
TextButton(
child: Text(
MaterialLocalizations.of(context).cancelButtonLabel,
TextButton(
child: Text(
AppLocalizations.of(context).delete,
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
onPressed: () => Navigator.of(contextDialog).pop(),
),
TextButton(
child: Text(
AppLocalizations.of(context).delete,
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
),
onPressed: () {
// Confirmed, delete the plan
_nutritionProvider.deletePlan(currentPlan.id!);
onPressed: () {
// Confirmed, delete the plan
nutritionProvider.deletePlan(currentPlan.id!);
// Close the popup
Navigator.of(contextDialog).pop();
// Close the popup
Navigator.of(contextDialog).pop();
// and inform the user
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
AppLocalizations.of(context).successfullyDeleted,
textAlign: TextAlign.center,
),
// and inform the user
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
AppLocalizations.of(context).successfullyDeleted,
textAlign: TextAlign.center,
),
);
},
),
],
);
},
);
},
),
],
),
),
);
},
),
],
);
},
);
},
),
],
),
),
);

View File

@@ -79,14 +79,14 @@ class NavigationHeader extends StatelessWidget {
final PageController _controller;
final String _title;
final Map<Exercise, int> exercisePages;
final int ?totalPages;
final int? totalPages;
const NavigationHeader(
this._title,
this._controller, {
this.totalPages,
required this.exercisePages
});
this.totalPages,
required this.exercisePages,
});
Widget getDialog(BuildContext context) {
final TextButton? endWorkoutButton = totalPages != null

View File

@@ -16,12 +16,12 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) rive_common_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "RivePlugin");
rive_plugin_register_with_registrar(rive_common_registrar);
g_autoptr(FlPluginRegistrar) powersync_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "PowersyncFlutterLibsPlugin");
powersync_flutter_libs_plugin_register_with_registrar(powersync_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) rive_common_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "RivePlugin");
rive_plugin_register_with_registrar(rive_common_registrar);
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);

View File

@@ -297,6 +297,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.3"
fetch_api:
dependency: transitive
description:
name: fetch_api
sha256: "24cbd5616f3d4008c335c197bb90bfa0eb43b9e55c6de5c60d1f805092636034"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
fetch_client:
dependency: transitive
description:
name: fetch_client
sha256: "375253f4efe64303c793fb17fe90771c591320b2ae11fb29cb5b406cc8533c00"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
ffi:
dependency: transitive
description:
@@ -688,10 +704,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.20.2"
version: "0.19.0"
io:
dependency: transitive
description:
@@ -828,6 +844,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.1.3"
mutex:
dependency: transitive
description:
name: mutex
sha256: "8827da25de792088eb33e572115a5eb0d61d61a3c01acbc8bcbe76ed78f1a1f2"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
nested:
dependency: transitive
description:
@@ -1004,6 +1028,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.0.2"
powersync:
dependency: "direct main"
description:
name: powersync
sha256: "09d0bcdd458bdd7cd47300bee90b55e7df803fbd71f66b7a5a200f247e76e641"
url: "https://pub.dev"
source: hosted
version: "1.8.9"
powersync_flutter_libs:
dependency: transitive
description:
name: powersync_flutter_libs
sha256: "6385c74c3537b72086f62becd038e1f4a50bff57783e260de95f89f1c2a16aa2"
url: "https://pub.dev"
source: hosted
version: "0.4.12"
process:
dependency: transitive
description:
@@ -1185,6 +1225,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.10.1"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sqlite3:
dependency: transitive
description:
@@ -1201,6 +1249,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.40"
sqlite3_web:
dependency: transitive
description:
name: sqlite3_web
sha256: "73f730b621f5c255722f0e35cf5fc5f38610d9b18e80f70c2c532008cdb83e39"
url: "https://pub.dev"
source: hosted
version: "0.2.2"
sqlite_async:
dependency: "direct main"
description:
name: sqlite_async
sha256: "1f7b36e6b5b459bae89941ae1d3ae8151a3c14b8242c3b94e75aea4a692361e2"
url: "https://pub.dev"
source: hosted
version: "0.9.1"
sqlparser:
dependency: transitive
description:
@@ -1289,6 +1353,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
universal_io:
dependency: transitive
description:
name: universal_io
sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
url_launcher:
dependency: "direct main"
description:
@@ -1353,6 +1425,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.4"
uuid:
dependency: transitive
description:
name: uuid
sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff
url: "https://pub.dev"
source: hosted
version: "4.5.1"
vector_graphics:
dependency: transitive
description:

View File

@@ -56,10 +56,6 @@ dependencies:
intl: ^0.20.0
json_annotation: ^4.8.1
multi_select_flutter: ^4.1.3
flutter_svg: ^2.0.10+1
fl_chart: ^0.69.0
flutter_zxing: ^1.5.2
drift: ^2.16.0
package_info_plus: ^9.0.0
path: ^1.9.0
path_provider: ^2.1.5
@@ -73,7 +69,6 @@ dependencies:
video_player: ^2.10.0
logging: ^1.3.0
flutter_riverpod: ^2.6.1
flutter_svg_icons: ^0.0.1
sqlite_async: ^0.9.0
dependency_overrides:

View File

@@ -48,7 +48,10 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#head, [url], {#headers: headers}),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})),
_FakeResponse_0(
this,
Invocation.method(#head, [url], {#headers: headers}),
),
),
)
as _i3.Future<_i2.Response>);
@@ -58,7 +61,10 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#get, [url], {#headers: headers}),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})),
_FakeResponse_0(
this,
Invocation.method(#get, [url], {#headers: headers}),
),
),
)
as _i3.Future<_i2.Response>);
@@ -71,7 +77,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i4.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#post,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(
this,
@@ -93,7 +103,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i4.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#put,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(
this,
@@ -115,7 +129,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i4.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#patch,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(
this,
@@ -160,13 +178,19 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#read, [url], {#headers: headers}),
returnValue: _i3.Future<String>.value(
_i5.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
_i5.dummyValue<String>(
this,
Invocation.method(#read, [url], {#headers: headers}),
),
),
)
as _i3.Future<String>);
@override
_i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
_i3.Future<_i6.Uint8List> readBytes(
Uri? url, {
Map<String, String>? headers,
}) =>
(super.noSuchMethod(
Invocation.method(#readBytes, [url], {#headers: headers}),
returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
@@ -178,12 +202,17 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#send, [request]),
returnValue: _i3.Future<_i2.StreamedResponse>.value(
_FakeStreamedResponse_1(this, Invocation.method(#send, [request])),
_FakeStreamedResponse_1(
this,
Invocation.method(#send, [request]),
),
),
)
as _i3.Future<_i2.StreamedResponse>);
@override
void close() =>
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
void close() => super.noSuchMethod(
Invocation.method(#close, []),
returnValueForMissingStub: null,
);
}

View File

@@ -130,7 +130,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -138,18 +141,27 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
_i3.ExerciseDatabase get database =>
(super.noSuchMethod(
Invocation.getter(#database),
returnValue: _FakeExerciseDatabase_1(this, Invocation.getter(#database)),
returnValue: _FakeExerciseDatabase_1(
this,
Invocation.getter(#database),
),
)
as _i3.ExerciseDatabase);
@override
List<_i4.Exercise> get exercises =>
(super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i4.Exercise>[])
(super.noSuchMethod(
Invocation.getter(#exercises),
returnValue: <_i4.Exercise>[],
)
as List<_i4.Exercise>);
@override
List<_i4.Exercise> get filteredExercises =>
(super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[])
(super.noSuchMethod(
Invocation.getter(#filteredExercises),
returnValue: <_i4.Exercise>[],
)
as List<_i4.Exercise>);
@override
@@ -162,31 +174,47 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
@override
List<_i5.ExerciseCategory> get categories =>
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i5.ExerciseCategory>[])
(super.noSuchMethod(
Invocation.getter(#categories),
returnValue: <_i5.ExerciseCategory>[],
)
as List<_i5.ExerciseCategory>);
@override
List<_i7.Muscle> get muscles =>
(super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i7.Muscle>[])
(super.noSuchMethod(
Invocation.getter(#muscles),
returnValue: <_i7.Muscle>[],
)
as List<_i7.Muscle>);
@override
List<_i6.Equipment> get equipment =>
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i6.Equipment>[])
(super.noSuchMethod(
Invocation.getter(#equipment),
returnValue: <_i6.Equipment>[],
)
as List<_i6.Equipment>);
@override
List<_i8.Language> get languages =>
(super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i8.Language>[])
(super.noSuchMethod(
Invocation.getter(#languages),
returnValue: <_i8.Language>[],
)
as List<_i8.Language>);
@override
set database(_i3.ExerciseDatabase? value) =>
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
set database(_i3.ExerciseDatabase? value) => super.noSuchMethod(
Invocation.setter(#database, value),
returnValueForMissingStub: null,
);
@override
set exercises(List<_i4.Exercise>? value) =>
super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null);
set exercises(List<_i4.Exercise>? value) => super.noSuchMethod(
Invocation.setter(#exercises, value),
returnValueForMissingStub: null,
);
@override
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
@@ -195,8 +223,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
);
@override
set languages(List<_i8.Language>? languages) =>
super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null);
set languages(List<_i8.Language>? languages) => super.noSuchMethod(
Invocation.setter(#languages, languages),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
@@ -212,8 +242,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
as _i18.Future<void>);
@override
void initFilters() =>
super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null);
void initFilters() => super.noSuchMethod(
Invocation.method(#initFilters, []),
returnValueForMissingStub: null,
);
@override
_i18.Future<void> findByFilters() =>
@@ -225,19 +257,27 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
as _i18.Future<void>);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i4.Exercise findExerciseById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findExerciseById, [id]),
returnValue: _FakeExercise_2(this, Invocation.method(#findExerciseById, [id])),
returnValue: _FakeExercise_2(
this,
Invocation.method(#findExerciseById, [id]),
),
)
as _i4.Exercise);
@override
List<_i4.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) =>
List<_i4.Exercise> findExercisesByVariationId(
int? variationId, {
int? exerciseIdToExclude,
}) =>
(super.noSuchMethod(
Invocation.method(
#findExercisesByVariationId,
@@ -252,7 +292,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
_i5.ExerciseCategory findCategoryById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findCategoryById, [id]),
returnValue: _FakeExerciseCategory_3(this, Invocation.method(#findCategoryById, [id])),
returnValue: _FakeExerciseCategory_3(
this,
Invocation.method(#findCategoryById, [id]),
),
)
as _i5.ExerciseCategory);
@@ -260,7 +303,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
_i6.Equipment findEquipmentById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findEquipmentById, [id]),
returnValue: _FakeEquipment_4(this, Invocation.method(#findEquipmentById, [id])),
returnValue: _FakeEquipment_4(
this,
Invocation.method(#findEquipmentById, [id]),
),
)
as _i6.Equipment);
@@ -268,7 +314,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
_i7.Muscle findMuscleById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findMuscleById, [id]),
returnValue: _FakeMuscle_5(this, Invocation.method(#findMuscleById, [id])),
returnValue: _FakeMuscle_5(
this,
Invocation.method(#findMuscleById, [id]),
),
)
as _i7.Muscle);
@@ -276,7 +325,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
_i8.Language findLanguageById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findLanguageById, [id]),
returnValue: _FakeLanguage_6(this, Invocation.method(#findLanguageById, [id])),
returnValue: _FakeLanguage_6(
this,
Invocation.method(#findLanguageById, [id]),
),
)
as _i8.Language);
@@ -339,11 +391,17 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
int? exerciseId,
) =>
(super.noSuchMethod(
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
Invocation.method(#handleUpdateExerciseFromApi, [
database,
exerciseId,
]),
returnValue: _i18.Future<_i4.Exercise>.value(
_FakeExercise_2(
this,
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
Invocation.method(#handleUpdateExerciseFromApi, [
database,
exerciseId,
]),
),
),
)
@@ -352,7 +410,9 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
@override
_i18.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
(super.noSuchMethod(
Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}),
Invocation.method(#initCacheTimesLocalPrefs, [], {
#forceInit: forceInit,
}),
returnValue: _i18.Future<void>.value(),
returnValueForMissingStub: _i18.Future<void>.value(),
)
@@ -449,7 +509,9 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
[name],
{#languageCode: languageCode, #searchEnglish: searchEnglish},
),
returnValue: _i18.Future<List<_i4.Exercise>>.value(<_i4.Exercise>[]),
returnValue: _i18.Future<List<_i4.Exercise>>.value(
<_i4.Exercise>[],
),
)
as _i18.Future<List<_i4.Exercise>>);
@@ -466,12 +528,16 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [NutritionPlansProvider].
@@ -486,7 +552,10 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -494,92 +563,84 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
_i9.IngredientDatabase get database =>
(super.noSuchMethod(
Invocation.getter(#database),
returnValue: _FakeIngredientDatabase_7(this, Invocation.getter(#database)),
returnValue: _FakeIngredientDatabase_7(
this,
Invocation.getter(#database),
),
)
as _i9.IngredientDatabase);
@override
List<_i13.Ingredient> get ingredients =>
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i13.Ingredient>[])
(super.noSuchMethod(
Invocation.getter(#ingredients),
returnValue: <_i13.Ingredient>[],
)
as List<_i13.Ingredient>);
@override
List<_i10.NutritionalPlan> get items =>
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i10.NutritionalPlan>[])
(super.noSuchMethod(
Invocation.getter(#items),
returnValue: <_i10.NutritionalPlan>[],
)
as List<_i10.NutritionalPlan>);
@override
set database(_i9.IngredientDatabase? value) =>
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
set database(_i9.IngredientDatabase? value) => super.noSuchMethod(
Invocation.setter(#database, value),
returnValueForMissingStub: null,
);
@override
set ingredients(List<_i13.Ingredient>? value) =>
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
set ingredients(List<_i13.Ingredient>? value) => super.noSuchMethod(
Invocation.setter(#ingredients, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i10.NutritionalPlan findById(int? id) =>
_i18.Stream<_i10.NutritionalPlan?> watchNutritionPlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#findById, [id]),
returnValue: _FakeNutritionalPlan_8(this, Invocation.method(#findById, [id])),
Invocation.method(#watchNutritionPlan, [id]),
returnValue: _i18.Stream<_i10.NutritionalPlan?>.empty(),
)
as _i10.NutritionalPlan);
as _i18.Stream<_i10.NutritionalPlan?>);
@override
_i11.Meal? findMealById(int? id) =>
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i11.Meal?);
@override
_i18.Future<void> fetchAndSetAllPlansSparse() =>
_i18.Stream<_i10.NutritionalPlan> watchNutritionPlanLast() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansSparse, []),
returnValue: _i18.Future<void>.value(),
returnValueForMissingStub: _i18.Future<void>.value(),
Invocation.method(#watchNutritionPlanLast, []),
returnValue: _i18.Stream<_i10.NutritionalPlan>.empty(),
)
as _i18.Future<void>);
as _i18.Stream<_i10.NutritionalPlan>);
@override
_i18.Future<void> fetchAndSetAllPlansFull() =>
_i18.Stream<List<_i10.NutritionalPlan>> watchNutritionPlans() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansFull, []),
returnValue: _i18.Future<void>.value(),
returnValueForMissingStub: _i18.Future<void>.value(),
Invocation.method(#watchNutritionPlans, []),
returnValue: _i18.Stream<List<_i10.NutritionalPlan>>.empty(),
)
as _i18.Future<void>);
@override
_i18.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanSparse, [planId]),
returnValue: _i18.Future<_i10.NutritionalPlan>.value(
_FakeNutritionalPlan_8(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
),
)
as _i18.Future<_i10.NutritionalPlan>);
@override
_i18.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanFull, [planId]),
returnValue: _i18.Future<_i10.NutritionalPlan>.value(
_FakeNutritionalPlan_8(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
),
)
as _i18.Future<_i10.NutritionalPlan>);
as _i18.Stream<List<_i10.NutritionalPlan>>);
@override
_i18.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) =>
(super.noSuchMethod(
Invocation.method(#addPlan, [planData]),
returnValue: _i18.Future<_i10.NutritionalPlan>.value(
_FakeNutritionalPlan_8(this, Invocation.method(#addPlan, [planData])),
_FakeNutritionalPlan_8(
this,
Invocation.method(#addPlan, [planData]),
),
),
)
as _i18.Future<_i10.NutritionalPlan>);
@@ -594,7 +655,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
as _i18.Future<void>);
@override
_i18.Future<void> deletePlan(int? id) =>
_i18.Future<void> deletePlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#deletePlan, [id]),
returnValue: _i18.Future<void>.value(),
@@ -603,7 +664,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
as _i18.Future<void>);
@override
_i18.Future<_i11.Meal> addMeal(_i11.Meal? meal, int? planId) =>
_i18.Future<_i11.Meal> addMeal(_i11.Meal? meal, String? planId) =>
(super.noSuchMethod(
Invocation.method(#addMeal, [meal, planId]),
returnValue: _i18.Future<_i11.Meal>.value(
@@ -632,11 +693,17 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
as _i18.Future<void>);
@override
_i18.Future<_i12.MealItem> addMealItem(_i12.MealItem? mealItem, _i11.Meal? meal) =>
_i18.Future<_i12.MealItem> addMealItem(
_i12.MealItem? mealItem,
_i11.Meal? meal,
) =>
(super.noSuchMethod(
Invocation.method(#addMealItem, [mealItem, meal]),
returnValue: _i18.Future<_i12.MealItem>.value(
_FakeMealItem_10(this, Invocation.method(#addMealItem, [mealItem, meal])),
_FakeMealItem_10(
this,
Invocation.method(#addMealItem, [mealItem, meal]),
),
),
)
as _i18.Future<_i12.MealItem>);
@@ -665,11 +732,19 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
_i9.IngredientDatabase? database,
}) =>
(super.noSuchMethod(
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
returnValue: _i18.Future<_i13.Ingredient>.value(
_FakeIngredient_11(
this,
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
),
),
)
@@ -696,7 +771,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
[name],
{#languageCode: languageCode, #searchEnglish: searchEnglish},
),
returnValue: _i18.Future<List<_i13.Ingredient>>.value(<_i13.Ingredient>[]),
returnValue: _i18.Future<List<_i13.Ingredient>>.value(
<_i13.Ingredient>[],
),
)
as _i18.Future<List<_i13.Ingredient>>);
@@ -720,18 +797,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
@override
_i18.Future<void> logIngredientToDiary(
_i12.MealItem? mealItem,
int? planId, [
String? planId, [
DateTime? dateTime,
]) =>
(super.noSuchMethod(
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
Invocation.method(#logIngredientToDiary, [
mealItem,
planId,
dateTime,
]),
returnValue: _i18.Future<void>.value(),
returnValueForMissingStub: _i18.Future<void>.value(),
)
as _i18.Future<void>);
@override
_i18.Future<void> deleteLog(int? logId, int? planId) =>
_i18.Future<void> deleteLog(String? logId, String? planId) =>
(super.noSuchMethod(
Invocation.method(#deleteLog, [logId, planId]),
returnValue: _i18.Future<void>.value(),
@@ -761,12 +842,16 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [UserProvider].
@@ -779,14 +864,20 @@ class MockUserProvider extends _i1.Mock implements _i21.UserProvider {
@override
_i22.ThemeMode get themeMode =>
(super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i22.ThemeMode.system)
(super.noSuchMethod(
Invocation.getter(#themeMode),
returnValue: _i22.ThemeMode.system,
)
as _i22.ThemeMode);
@override
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -794,33 +885,46 @@ class MockUserProvider extends _i1.Mock implements _i21.UserProvider {
_i14.SharedPreferencesAsync get prefs =>
(super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakeSharedPreferencesAsync_12(this, Invocation.getter(#prefs)),
returnValue: _FakeSharedPreferencesAsync_12(
this,
Invocation.getter(#prefs),
),
)
as _i14.SharedPreferencesAsync);
@override
set themeMode(_i22.ThemeMode? value) =>
super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null);
set themeMode(_i22.ThemeMode? value) => super.noSuchMethod(
Invocation.setter(#themeMode, value),
returnValueForMissingStub: null,
);
@override
set prefs(_i14.SharedPreferencesAsync? value) =>
super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null);
set prefs(_i14.SharedPreferencesAsync? value) => super.noSuchMethod(
Invocation.setter(#prefs, value),
returnValueForMissingStub: null,
);
@override
set profile(_i23.Profile? value) =>
super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null);
set profile(_i23.Profile? value) => super.noSuchMethod(
Invocation.setter(#profile, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
void setThemeMode(_i22.ThemeMode? mode) =>
super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null);
void setThemeMode(_i22.ThemeMode? mode) => super.noSuchMethod(
Invocation.method(#setThemeMode, [mode]),
returnValueForMissingStub: null,
);
@override
_i18.Future<void> fetchAndSetProfile() =>
@@ -862,12 +966,16 @@ class MockUserProvider extends _i1.Mock implements _i21.UserProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [WgerBaseProvider].
@@ -895,23 +1003,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
as _i16.Client);
@override
set auth(_i15.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i15.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i16.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i16.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -946,18 +1065,28 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
as _i18.Future<List<dynamic>>);
@override
_i18.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
_i18.Future<Map<String, dynamic>> post(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i18.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i18.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -966,7 +1095,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i18.Future<_i16.Response>.value(
_FakeResponse_16(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_16(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i18.Future<_i16.Response>);
@@ -993,7 +1125,9 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferen
_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?>>);
@@ -1007,7 +1141,10 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferen
@override
_i18.Future<int?> getInt(String? key) =>
(super.noSuchMethod(Invocation.method(#getInt, [key]), returnValue: _i18.Future<int?>.value())
(super.noSuchMethod(
Invocation.method(#getInt, [key]),
returnValue: _i18.Future<int?>.value(),
)
as _i18.Future<int?>);
@override

File diff suppressed because it is too large Load Diff

View File

@@ -72,7 +72,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -88,23 +91,35 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
String get author =>
(super.noSuchMethod(
Invocation.getter(#author),
returnValue: _i8.dummyValue<String>(this, Invocation.getter(#author)),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#author),
),
)
as String);
@override
List<String> get alternateNamesEn =>
(super.noSuchMethod(Invocation.getter(#alternateNamesEn), returnValue: <String>[])
(super.noSuchMethod(
Invocation.getter(#alternateNamesEn),
returnValue: <String>[],
)
as List<String>);
@override
List<String> get alternateNamesTrans =>
(super.noSuchMethod(Invocation.getter(#alternateNamesTrans), returnValue: <String>[])
(super.noSuchMethod(
Invocation.getter(#alternateNamesTrans),
returnValue: <String>[],
)
as List<String>);
@override
List<_i9.Equipment> get equipment =>
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i9.Equipment>[])
(super.noSuchMethod(
Invocation.getter(#equipment),
returnValue: <_i9.Equipment>[],
)
as List<_i9.Equipment>);
@override
@@ -121,12 +136,18 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
@override
List<_i10.Muscle> get primaryMuscles =>
(super.noSuchMethod(Invocation.getter(#primaryMuscles), returnValue: <_i10.Muscle>[])
(super.noSuchMethod(
Invocation.getter(#primaryMuscles),
returnValue: <_i10.Muscle>[],
)
as List<_i10.Muscle>);
@override
List<_i10.Muscle> get secondaryMuscles =>
(super.noSuchMethod(Invocation.getter(#secondaryMuscles), returnValue: <_i10.Muscle>[])
(super.noSuchMethod(
Invocation.getter(#secondaryMuscles),
returnValue: <_i10.Muscle>[],
)
as List<_i10.Muscle>);
@override
@@ -141,8 +162,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
as _i11.ExerciseSubmissionApi);
@override
set author(String? value) =>
super.noSuchMethod(Invocation.setter(#author, value), returnValueForMissingStub: null);
set author(String? value) => super.noSuchMethod(
Invocation.setter(#author, value),
returnValueForMissingStub: null,
);
@override
set exerciseNameEn(String? value) => super.noSuchMethod(
@@ -157,8 +180,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
);
@override
set descriptionEn(String? value) =>
super.noSuchMethod(Invocation.setter(#descriptionEn, value), returnValueForMissingStub: null);
set descriptionEn(String? value) => super.noSuchMethod(
Invocation.setter(#descriptionEn, value),
returnValueForMissingStub: null,
);
@override
set descriptionTrans(String? value) => super.noSuchMethod(
@@ -167,8 +192,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
);
@override
set languageEn(_i12.Language? value) =>
super.noSuchMethod(Invocation.setter(#languageEn, value), returnValueForMissingStub: null);
set languageEn(_i12.Language? value) => super.noSuchMethod(
Invocation.setter(#languageEn, value),
returnValueForMissingStub: null,
);
@override
set languageTranslation(_i12.Language? value) => super.noSuchMethod(
@@ -189,12 +216,16 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
);
@override
set category(_i13.ExerciseCategory? value) =>
super.noSuchMethod(Invocation.setter(#category, value), returnValueForMissingStub: null);
set category(_i13.ExerciseCategory? value) => super.noSuchMethod(
Invocation.setter(#category, value),
returnValueForMissingStub: null,
);
@override
set equipment(List<_i9.Equipment>? equipment) =>
super.noSuchMethod(Invocation.setter(#equipment, equipment), returnValueForMissingStub: null);
set equipment(List<_i9.Equipment>? equipment) => super.noSuchMethod(
Invocation.setter(#equipment, equipment),
returnValueForMissingStub: null,
);
@override
set variationConnectToExercise(int? value) => super.noSuchMethod(
@@ -225,8 +256,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
void addExerciseImages(List<_i7.ExerciseSubmissionImage>? images) => super.noSuchMethod(
@@ -235,8 +268,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
);
@override
void removeImage(String? path) =>
super.noSuchMethod(Invocation.method(#removeImage, [path]), returnValueForMissingStub: null);
void removeImage(String? path) => super.noSuchMethod(
Invocation.method(#removeImage, [path]),
returnValueForMissingStub: null,
);
@override
_i14.Future<int> postExerciseToServer() =>
@@ -284,12 +319,16 @@ class MockAddExerciseProvider extends _i1.Mock implements _i6.AddExerciseProvide
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [WgerBaseProvider].
@@ -317,23 +356,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
as _i5.Client);
@override
set auth(_i4.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i4.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i5.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i5.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -368,18 +418,28 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
as _i14.Future<List<dynamic>>);
@override
_i14.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
_i14.Future<Map<String, dynamic>> post(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#post, [data, uri]),
returnValue: _i14.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue: _i14.Future<Map<String, dynamic>>.value(
<String, dynamic>{},
),
)
as _i14.Future<Map<String, dynamic>>);
@override
_i14.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i14.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, uri]),
returnValue: _i14.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue: _i14.Future<Map<String, dynamic>>.value(
<String, dynamic>{},
),
)
as _i14.Future<Map<String, dynamic>>);
@@ -388,7 +448,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i14.Future<_i5.Response>.value(
_FakeResponse_5(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_5(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i14.Future<_i5.Response>);

View File

@@ -74,7 +74,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -82,18 +85,27 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
_i3.ExerciseDatabase get database =>
(super.noSuchMethod(
Invocation.getter(#database),
returnValue: _FakeExerciseDatabase_1(this, Invocation.getter(#database)),
returnValue: _FakeExerciseDatabase_1(
this,
Invocation.getter(#database),
),
)
as _i3.ExerciseDatabase);
@override
List<_i4.Exercise> get exercises =>
(super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i4.Exercise>[])
(super.noSuchMethod(
Invocation.getter(#exercises),
returnValue: <_i4.Exercise>[],
)
as List<_i4.Exercise>);
@override
List<_i4.Exercise> get filteredExercises =>
(super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[])
(super.noSuchMethod(
Invocation.getter(#filteredExercises),
returnValue: <_i4.Exercise>[],
)
as List<_i4.Exercise>);
@override
@@ -106,31 +118,47 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
@override
List<_i5.ExerciseCategory> get categories =>
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i5.ExerciseCategory>[])
(super.noSuchMethod(
Invocation.getter(#categories),
returnValue: <_i5.ExerciseCategory>[],
)
as List<_i5.ExerciseCategory>);
@override
List<_i7.Muscle> get muscles =>
(super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i7.Muscle>[])
(super.noSuchMethod(
Invocation.getter(#muscles),
returnValue: <_i7.Muscle>[],
)
as List<_i7.Muscle>);
@override
List<_i6.Equipment> get equipment =>
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i6.Equipment>[])
(super.noSuchMethod(
Invocation.getter(#equipment),
returnValue: <_i6.Equipment>[],
)
as List<_i6.Equipment>);
@override
List<_i8.Language> get languages =>
(super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i8.Language>[])
(super.noSuchMethod(
Invocation.getter(#languages),
returnValue: <_i8.Language>[],
)
as List<_i8.Language>);
@override
set database(_i3.ExerciseDatabase? value) =>
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
set database(_i3.ExerciseDatabase? value) => super.noSuchMethod(
Invocation.setter(#database, value),
returnValueForMissingStub: null,
);
@override
set exercises(List<_i4.Exercise>? value) =>
super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null);
set exercises(List<_i4.Exercise>? value) => super.noSuchMethod(
Invocation.setter(#exercises, value),
returnValueForMissingStub: null,
);
@override
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
@@ -139,8 +167,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
);
@override
set languages(List<_i8.Language>? languages) =>
super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null);
set languages(List<_i8.Language>? languages) => super.noSuchMethod(
Invocation.setter(#languages, languages),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
@@ -156,8 +186,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
as _i10.Future<void>);
@override
void initFilters() =>
super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null);
void initFilters() => super.noSuchMethod(
Invocation.method(#initFilters, []),
returnValueForMissingStub: null,
);
@override
_i10.Future<void> findByFilters() =>
@@ -169,19 +201,27 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
as _i10.Future<void>);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i4.Exercise findExerciseById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findExerciseById, [id]),
returnValue: _FakeExercise_2(this, Invocation.method(#findExerciseById, [id])),
returnValue: _FakeExercise_2(
this,
Invocation.method(#findExerciseById, [id]),
),
)
as _i4.Exercise);
@override
List<_i4.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) =>
List<_i4.Exercise> findExercisesByVariationId(
int? variationId, {
int? exerciseIdToExclude,
}) =>
(super.noSuchMethod(
Invocation.method(
#findExercisesByVariationId,
@@ -196,7 +236,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
_i5.ExerciseCategory findCategoryById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findCategoryById, [id]),
returnValue: _FakeExerciseCategory_3(this, Invocation.method(#findCategoryById, [id])),
returnValue: _FakeExerciseCategory_3(
this,
Invocation.method(#findCategoryById, [id]),
),
)
as _i5.ExerciseCategory);
@@ -204,7 +247,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
_i6.Equipment findEquipmentById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findEquipmentById, [id]),
returnValue: _FakeEquipment_4(this, Invocation.method(#findEquipmentById, [id])),
returnValue: _FakeEquipment_4(
this,
Invocation.method(#findEquipmentById, [id]),
),
)
as _i6.Equipment);
@@ -212,7 +258,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
_i7.Muscle findMuscleById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findMuscleById, [id]),
returnValue: _FakeMuscle_5(this, Invocation.method(#findMuscleById, [id])),
returnValue: _FakeMuscle_5(
this,
Invocation.method(#findMuscleById, [id]),
),
)
as _i7.Muscle);
@@ -220,7 +269,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
_i8.Language findLanguageById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findLanguageById, [id]),
returnValue: _FakeLanguage_6(this, Invocation.method(#findLanguageById, [id])),
returnValue: _FakeLanguage_6(
this,
Invocation.method(#findLanguageById, [id]),
),
)
as _i8.Language);
@@ -283,11 +335,17 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
int? exerciseId,
) =>
(super.noSuchMethod(
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
Invocation.method(#handleUpdateExerciseFromApi, [
database,
exerciseId,
]),
returnValue: _i10.Future<_i4.Exercise>.value(
_FakeExercise_2(
this,
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
Invocation.method(#handleUpdateExerciseFromApi, [
database,
exerciseId,
]),
),
),
)
@@ -296,7 +354,9 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
@override
_i10.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
(super.noSuchMethod(
Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}),
Invocation.method(#initCacheTimesLocalPrefs, [], {
#forceInit: forceInit,
}),
returnValue: _i10.Future<void>.value(),
returnValueForMissingStub: _i10.Future<void>.value(),
)
@@ -393,7 +453,9 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
[name],
{#languageCode: languageCode, #searchEnglish: searchEnglish},
),
returnValue: _i10.Future<List<_i4.Exercise>>.value(<_i4.Exercise>[]),
returnValue: _i10.Future<List<_i4.Exercise>>.value(
<_i4.Exercise>[],
),
)
as _i10.Future<List<_i4.Exercise>>);
@@ -410,10 +472,14 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -54,12 +54,17 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
@override
List<_i5.Image> get images =>
(super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[])
(super.noSuchMethod(
Invocation.getter(#images),
returnValue: <_i5.Image>[],
)
as List<_i5.Image>);
@override
set images(List<_i5.Image>? value) =>
super.noSuchMethod(Invocation.setter(#images, value), returnValueForMissingStub: null);
set images(List<_i5.Image>? value) => super.noSuchMethod(
Invocation.setter(#images, value),
returnValueForMissingStub: null,
);
@override
_i2.AuthProvider get auth =>
@@ -78,20 +83,26 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
as _i3.Client);
@override
set auth(_i2.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i6.Future<void> fetchAndSetGallery() =>
@@ -132,13 +143,20 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -176,15 +194,22 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i6.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i6.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -193,7 +218,10 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i6.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i6.Future<_i3.Response>);
@@ -211,10 +239,14 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -54,12 +54,17 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
@override
List<_i5.Image> get images =>
(super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[])
(super.noSuchMethod(
Invocation.getter(#images),
returnValue: <_i5.Image>[],
)
as List<_i5.Image>);
@override
set images(List<_i5.Image>? value) =>
super.noSuchMethod(Invocation.setter(#images, value), returnValueForMissingStub: null);
set images(List<_i5.Image>? value) => super.noSuchMethod(
Invocation.setter(#images, value),
returnValueForMissingStub: null,
);
@override
_i2.AuthProvider get auth =>
@@ -78,20 +83,26 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
as _i3.Client);
@override
set auth(_i2.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i6.Future<void> fetchAndSetGallery() =>
@@ -132,13 +143,20 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -176,15 +194,22 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i6.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i6.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -193,7 +218,10 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i6.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i6.Future<_i3.Response>);
@@ -211,10 +239,14 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -49,13 +49,19 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@override
List<_i3.MeasurementCategory> get categories =>
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i3.MeasurementCategory>[])
(super.noSuchMethod(
Invocation.getter(#categories),
returnValue: <_i3.MeasurementCategory>[],
)
as List<_i3.MeasurementCategory>);
@override
@@ -63,8 +69,10 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i3.MeasurementCategory findCategoryById(int? id) =>
@@ -158,7 +166,13 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
DateTime? newDate,
) =>
(super.noSuchMethod(
Invocation.method(#editEntry, [id, categoryId, newValue, newNotes, newDate]),
Invocation.method(#editEntry, [
id,
categoryId,
newValue,
newNotes,
newDate,
]),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
)
@@ -177,10 +191,14 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -66,23 +66,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
as _i3.Client);
@override
set auth(_i2.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -120,15 +131,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i5.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -137,7 +155,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i5.Future<_i3.Response>);

View File

@@ -69,7 +69,10 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -77,92 +80,84 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
_i3.IngredientDatabase get database =>
(super.noSuchMethod(
Invocation.getter(#database),
returnValue: _FakeIngredientDatabase_1(this, Invocation.getter(#database)),
returnValue: _FakeIngredientDatabase_1(
this,
Invocation.getter(#database),
),
)
as _i3.IngredientDatabase);
@override
List<_i7.Ingredient> get ingredients =>
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[])
(super.noSuchMethod(
Invocation.getter(#ingredients),
returnValue: <_i7.Ingredient>[],
)
as List<_i7.Ingredient>);
@override
List<_i4.NutritionalPlan> get items =>
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.NutritionalPlan>[])
(super.noSuchMethod(
Invocation.getter(#items),
returnValue: <_i4.NutritionalPlan>[],
)
as List<_i4.NutritionalPlan>);
@override
set database(_i3.IngredientDatabase? value) =>
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
set database(_i3.IngredientDatabase? value) => super.noSuchMethod(
Invocation.setter(#database, value),
returnValueForMissingStub: null,
);
@override
set ingredients(List<_i7.Ingredient>? value) =>
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
set ingredients(List<_i7.Ingredient>? value) => super.noSuchMethod(
Invocation.setter(#ingredients, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i4.NutritionalPlan findById(int? id) =>
_i9.Stream<_i4.NutritionalPlan?> watchNutritionPlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#findById, [id]),
returnValue: _FakeNutritionalPlan_2(this, Invocation.method(#findById, [id])),
Invocation.method(#watchNutritionPlan, [id]),
returnValue: _i9.Stream<_i4.NutritionalPlan?>.empty(),
)
as _i4.NutritionalPlan);
as _i9.Stream<_i4.NutritionalPlan?>);
@override
_i5.Meal? findMealById(int? id) =>
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?);
@override
_i9.Future<void> fetchAndSetAllPlansSparse() =>
_i9.Stream<_i4.NutritionalPlan> watchNutritionPlanLast() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansSparse, []),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
Invocation.method(#watchNutritionPlanLast, []),
returnValue: _i9.Stream<_i4.NutritionalPlan>.empty(),
)
as _i9.Future<void>);
as _i9.Stream<_i4.NutritionalPlan>);
@override
_i9.Future<void> fetchAndSetAllPlansFull() =>
_i9.Stream<List<_i4.NutritionalPlan>> watchNutritionPlans() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansFull, []),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
Invocation.method(#watchNutritionPlans, []),
returnValue: _i9.Stream<List<_i4.NutritionalPlan>>.empty(),
)
as _i9.Future<void>);
@override
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanSparse, [planId]),
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
),
)
as _i9.Future<_i4.NutritionalPlan>);
@override
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanFull, [planId]),
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
),
)
as _i9.Future<_i4.NutritionalPlan>);
as _i9.Stream<List<_i4.NutritionalPlan>>);
@override
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
(super.noSuchMethod(
Invocation.method(#addPlan, [planData]),
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
_FakeNutritionalPlan_2(this, Invocation.method(#addPlan, [planData])),
_FakeNutritionalPlan_2(
this,
Invocation.method(#addPlan, [planData]),
),
),
)
as _i9.Future<_i4.NutritionalPlan>);
@@ -177,7 +172,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
as _i9.Future<void>);
@override
_i9.Future<void> deletePlan(int? id) =>
_i9.Future<void> deletePlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#deletePlan, [id]),
returnValue: _i9.Future<void>.value(),
@@ -186,7 +181,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
as _i9.Future<void>);
@override
_i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) =>
_i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, String? planId) =>
(super.noSuchMethod(
Invocation.method(#addMeal, [meal, planId]),
returnValue: _i9.Future<_i5.Meal>.value(
@@ -215,11 +210,17 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
as _i9.Future<void>);
@override
_i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) =>
_i9.Future<_i6.MealItem> addMealItem(
_i6.MealItem? mealItem,
_i5.Meal? meal,
) =>
(super.noSuchMethod(
Invocation.method(#addMealItem, [mealItem, meal]),
returnValue: _i9.Future<_i6.MealItem>.value(
_FakeMealItem_4(this, Invocation.method(#addMealItem, [mealItem, meal])),
_FakeMealItem_4(
this,
Invocation.method(#addMealItem, [mealItem, meal]),
),
),
)
as _i9.Future<_i6.MealItem>);
@@ -248,11 +249,19 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
_i3.IngredientDatabase? database,
}) =>
(super.noSuchMethod(
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
returnValue: _i9.Future<_i7.Ingredient>.value(
_FakeIngredient_5(
this,
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
),
),
)
@@ -279,7 +288,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
[name],
{#languageCode: languageCode, #searchEnglish: searchEnglish},
),
returnValue: _i9.Future<List<_i7.Ingredient>>.value(<_i7.Ingredient>[]),
returnValue: _i9.Future<List<_i7.Ingredient>>.value(
<_i7.Ingredient>[],
),
)
as _i9.Future<List<_i7.Ingredient>>);
@@ -303,18 +314,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
@override
_i9.Future<void> logIngredientToDiary(
_i6.MealItem? mealItem,
int? planId, [
String? planId, [
DateTime? dateTime,
]) =>
(super.noSuchMethod(
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
Invocation.method(#logIngredientToDiary, [
mealItem,
planId,
dateTime,
]),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
)
as _i9.Future<void>);
@override
_i9.Future<void> deleteLog(int? logId, int? planId) =>
_i9.Future<void> deleteLog(String? logId, String? planId) =>
(super.noSuchMethod(
Invocation.method(#deleteLog, [logId, planId]),
returnValue: _i9.Future<void>.value(),
@@ -344,10 +359,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -311,13 +311,13 @@ void main() {
await tester.enterText(find.byKey(const Key('field-weight')), '2');
// once ID and weight are set, it'll fetchIngredient and show macros preview and ingredient image
when(mockNutrition.fetchIngredient(1)).thenAnswer(
(_) => Future.value(
Ingredient.fromJson(jsonDecode(fixture('nutrition/ingredientinfo_59887.json'))),
),
);
await mockNetworkImagesFor(() => tester.pumpAndSettle());
// once ID and weight are set, it'll fetchIngredient and show macros preview and ingredient image
when(mockNutrition.fetchIngredient(1)).thenAnswer(
(_) => Future.value(
Ingredient.fromJson(jsonDecode(fixture('nutrition/ingredientinfo_59887.json'))),
),
);
await mockNetworkImagesFor(() => tester.pumpAndSettle());
expect(find.byKey(const Key('ingredient-scan-result-dialog')), findsNothing);

View File

@@ -69,7 +69,10 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -77,92 +80,84 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
_i3.IngredientDatabase get database =>
(super.noSuchMethod(
Invocation.getter(#database),
returnValue: _FakeIngredientDatabase_1(this, Invocation.getter(#database)),
returnValue: _FakeIngredientDatabase_1(
this,
Invocation.getter(#database),
),
)
as _i3.IngredientDatabase);
@override
List<_i7.Ingredient> get ingredients =>
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[])
(super.noSuchMethod(
Invocation.getter(#ingredients),
returnValue: <_i7.Ingredient>[],
)
as List<_i7.Ingredient>);
@override
List<_i4.NutritionalPlan> get items =>
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.NutritionalPlan>[])
(super.noSuchMethod(
Invocation.getter(#items),
returnValue: <_i4.NutritionalPlan>[],
)
as List<_i4.NutritionalPlan>);
@override
set database(_i3.IngredientDatabase? value) =>
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
set database(_i3.IngredientDatabase? value) => super.noSuchMethod(
Invocation.setter(#database, value),
returnValueForMissingStub: null,
);
@override
set ingredients(List<_i7.Ingredient>? value) =>
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
set ingredients(List<_i7.Ingredient>? value) => super.noSuchMethod(
Invocation.setter(#ingredients, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i4.NutritionalPlan findById(int? id) =>
_i9.Stream<_i4.NutritionalPlan?> watchNutritionPlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#findById, [id]),
returnValue: _FakeNutritionalPlan_2(this, Invocation.method(#findById, [id])),
Invocation.method(#watchNutritionPlan, [id]),
returnValue: _i9.Stream<_i4.NutritionalPlan?>.empty(),
)
as _i4.NutritionalPlan);
as _i9.Stream<_i4.NutritionalPlan?>);
@override
_i5.Meal? findMealById(int? id) =>
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?);
@override
_i9.Future<void> fetchAndSetAllPlansSparse() =>
_i9.Stream<_i4.NutritionalPlan> watchNutritionPlanLast() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansSparse, []),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
Invocation.method(#watchNutritionPlanLast, []),
returnValue: _i9.Stream<_i4.NutritionalPlan>.empty(),
)
as _i9.Future<void>);
as _i9.Stream<_i4.NutritionalPlan>);
@override
_i9.Future<void> fetchAndSetAllPlansFull() =>
_i9.Stream<List<_i4.NutritionalPlan>> watchNutritionPlans() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansFull, []),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
Invocation.method(#watchNutritionPlans, []),
returnValue: _i9.Stream<List<_i4.NutritionalPlan>>.empty(),
)
as _i9.Future<void>);
@override
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanSparse, [planId]),
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
),
)
as _i9.Future<_i4.NutritionalPlan>);
@override
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanFull, [planId]),
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
),
)
as _i9.Future<_i4.NutritionalPlan>);
as _i9.Stream<List<_i4.NutritionalPlan>>);
@override
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
(super.noSuchMethod(
Invocation.method(#addPlan, [planData]),
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
_FakeNutritionalPlan_2(this, Invocation.method(#addPlan, [planData])),
_FakeNutritionalPlan_2(
this,
Invocation.method(#addPlan, [planData]),
),
),
)
as _i9.Future<_i4.NutritionalPlan>);
@@ -177,7 +172,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
as _i9.Future<void>);
@override
_i9.Future<void> deletePlan(int? id) =>
_i9.Future<void> deletePlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#deletePlan, [id]),
returnValue: _i9.Future<void>.value(),
@@ -186,7 +181,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
as _i9.Future<void>);
@override
_i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) =>
_i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, String? planId) =>
(super.noSuchMethod(
Invocation.method(#addMeal, [meal, planId]),
returnValue: _i9.Future<_i5.Meal>.value(
@@ -215,11 +210,17 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
as _i9.Future<void>);
@override
_i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) =>
_i9.Future<_i6.MealItem> addMealItem(
_i6.MealItem? mealItem,
_i5.Meal? meal,
) =>
(super.noSuchMethod(
Invocation.method(#addMealItem, [mealItem, meal]),
returnValue: _i9.Future<_i6.MealItem>.value(
_FakeMealItem_4(this, Invocation.method(#addMealItem, [mealItem, meal])),
_FakeMealItem_4(
this,
Invocation.method(#addMealItem, [mealItem, meal]),
),
),
)
as _i9.Future<_i6.MealItem>);
@@ -248,11 +249,19 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
_i3.IngredientDatabase? database,
}) =>
(super.noSuchMethod(
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
returnValue: _i9.Future<_i7.Ingredient>.value(
_FakeIngredient_5(
this,
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
),
),
)
@@ -279,7 +288,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
[name],
{#languageCode: languageCode, #searchEnglish: searchEnglish},
),
returnValue: _i9.Future<List<_i7.Ingredient>>.value(<_i7.Ingredient>[]),
returnValue: _i9.Future<List<_i7.Ingredient>>.value(
<_i7.Ingredient>[],
),
)
as _i9.Future<List<_i7.Ingredient>>);
@@ -303,18 +314,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
@override
_i9.Future<void> logIngredientToDiary(
_i6.MealItem? mealItem,
int? planId, [
String? planId, [
DateTime? dateTime,
]) =>
(super.noSuchMethod(
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
Invocation.method(#logIngredientToDiary, [
mealItem,
planId,
dateTime,
]),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
)
as _i9.Future<void>);
@override
_i9.Future<void> deleteLog(int? logId, int? planId) =>
_i9.Future<void> deleteLog(String? logId, String? planId) =>
(super.noSuchMethod(
Invocation.method(#deleteLog, [logId, planId]),
returnValue: _i9.Future<void>.value(),
@@ -344,10 +359,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -76,23 +76,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
as _i3.Client);
@override
set auth(_i2.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -130,15 +141,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i5.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -147,7 +165,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i5.Future<_i3.Response>);
@@ -163,12 +184,18 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
@override
Map<String, String> get metadata =>
(super.noSuchMethod(Invocation.getter(#metadata), returnValue: <String, String>{})
(super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
_i2.AuthState get state =>
(super.noSuchMethod(Invocation.getter(#state), returnValue: _i2.AuthState.updateRequired)
(super.noSuchMethod(
Invocation.getter(#state),
returnValue: _i2.AuthState.updateRequired,
)
as _i2.AuthState);
@override
@@ -187,16 +214,22 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool);
@override
set token(String? value) =>
super.noSuchMethod(Invocation.setter(#token, value), returnValueForMissingStub: null);
set token(String? value) => super.noSuchMethod(
Invocation.setter(#token, value),
returnValueForMissingStub: null,
);
@override
set serverUrl(String? value) =>
super.noSuchMethod(Invocation.setter(#serverUrl, value), returnValueForMissingStub: null);
set serverUrl(String? value) => super.noSuchMethod(
Invocation.setter(#serverUrl, value),
returnValueForMissingStub: null,
);
@override
set serverVersion(String? value) =>
super.noSuchMethod(Invocation.setter(#serverVersion, value), returnValueForMissingStub: null);
set serverVersion(String? value) => super.noSuchMethod(
Invocation.setter(#serverVersion, value),
returnValueForMissingStub: null,
);
@override
set applicationVersion(_i6.PackageInfo? value) => super.noSuchMethod(
@@ -205,20 +238,28 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
);
@override
set metadata(Map<String, String>? value) =>
super.noSuchMethod(Invocation.setter(#metadata, value), returnValueForMissingStub: null);
set metadata(Map<String, String>? value) => super.noSuchMethod(
Invocation.setter(#metadata, value),
returnValueForMissingStub: null,
);
@override
set state(_i2.AuthState? value) =>
super.noSuchMethod(Invocation.setter(#state, value), returnValueForMissingStub: null);
set state(_i2.AuthState? value) => super.noSuchMethod(
Invocation.setter(#state, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
set dataInit(bool? value) =>
super.noSuchMethod(Invocation.setter(#dataInit, value), returnValueForMissingStub: null);
set dataInit(bool? value) => super.noSuchMethod(
Invocation.setter(#dataInit, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
@@ -275,7 +316,9 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
#serverUrl: serverUrl,
#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>);
@@ -287,8 +330,15 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
String? apiToken,
) =>
(super.noSuchMethod(
Invocation.method(#login, [username, password, serverUrl, apiToken]),
returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
Invocation.method(#login, [
username,
password,
serverUrl,
apiToken,
]),
returnValue: _i5.Future<_i2.LoginActions>.value(
_i2.LoginActions.update,
),
)
as _i5.Future<_i2.LoginActions>);
@@ -297,7 +347,10 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
(super.noSuchMethod(
Invocation.method(#getServerUrlFromPrefs, []),
returnValue: _i5.Future<String>.value(
_i7.dummyValue<String>(this, Invocation.method(#getServerUrlFromPrefs, [])),
_i7.dummyValue<String>(
this,
Invocation.method(#getServerUrlFromPrefs, []),
),
),
)
as _i5.Future<String>);
@@ -324,7 +377,10 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
String getAppNameHeader() =>
(super.noSuchMethod(
Invocation.method(#getAppNameHeader, []),
returnValue: _i7.dummyValue<String>(this, Invocation.method(#getAppNameHeader, [])),
returnValue: _i7.dummyValue<String>(
this,
Invocation.method(#getAppNameHeader, []),
),
)
as String);
@@ -341,12 +397,16 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [Client].
@@ -362,7 +422,10 @@ class MockClient extends _i1.Mock implements _i3.Client {
(super.noSuchMethod(
Invocation.method(#head, [url], {#headers: headers}),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})),
_FakeResponse_3(
this,
Invocation.method(#head, [url], {#headers: headers}),
),
),
)
as _i5.Future<_i3.Response>);
@@ -372,7 +435,10 @@ class MockClient extends _i1.Mock implements _i3.Client {
(super.noSuchMethod(
Invocation.method(#get, [url], {#headers: headers}),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})),
_FakeResponse_3(
this,
Invocation.method(#get, [url], {#headers: headers}),
),
),
)
as _i5.Future<_i3.Response>);
@@ -385,7 +451,11 @@ class MockClient extends _i1.Mock implements _i3.Client {
_i9.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#post,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(
this,
@@ -407,7 +477,11 @@ class MockClient extends _i1.Mock implements _i3.Client {
_i9.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#put,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(
this,
@@ -429,7 +503,11 @@ class MockClient extends _i1.Mock implements _i3.Client {
_i9.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#patch,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(
this,
@@ -474,13 +552,19 @@ class MockClient extends _i1.Mock implements _i3.Client {
(super.noSuchMethod(
Invocation.method(#read, [url], {#headers: headers}),
returnValue: _i5.Future<String>.value(
_i7.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
_i7.dummyValue<String>(
this,
Invocation.method(#read, [url], {#headers: headers}),
),
),
)
as _i5.Future<String>);
@override
_i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
_i5.Future<_i10.Uint8List> readBytes(
Uri? url, {
Map<String, String>? headers,
}) =>
(super.noSuchMethod(
Invocation.method(#readBytes, [url], {#headers: headers}),
returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)),
@@ -492,12 +576,17 @@ class MockClient extends _i1.Mock implements _i3.Client {
(super.noSuchMethod(
Invocation.method(#send, [request]),
returnValue: _i5.Future<_i3.StreamedResponse>.value(
_FakeStreamedResponse_4(this, Invocation.method(#send, [request])),
_FakeStreamedResponse_4(
this,
Invocation.method(#send, [request]),
),
),
)
as _i5.Future<_i3.StreamedResponse>);
@override
void close() =>
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
void close() => super.noSuchMethod(
Invocation.method(#close, []),
returnValueForMissingStub: null,
);
}

View File

@@ -61,12 +61,18 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
@override
Map<String, String> get metadata =>
(super.noSuchMethod(Invocation.getter(#metadata), returnValue: <String, String>{})
(super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
_i3.AuthState get state =>
(super.noSuchMethod(Invocation.getter(#state), returnValue: _i3.AuthState.updateRequired)
(super.noSuchMethod(
Invocation.getter(#state),
returnValue: _i3.AuthState.updateRequired,
)
as _i3.AuthState);
@override
@@ -85,16 +91,22 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool);
@override
set token(String? value) =>
super.noSuchMethod(Invocation.setter(#token, value), returnValueForMissingStub: null);
set token(String? value) => super.noSuchMethod(
Invocation.setter(#token, value),
returnValueForMissingStub: null,
);
@override
set serverUrl(String? value) =>
super.noSuchMethod(Invocation.setter(#serverUrl, value), returnValueForMissingStub: null);
set serverUrl(String? value) => super.noSuchMethod(
Invocation.setter(#serverUrl, value),
returnValueForMissingStub: null,
);
@override
set serverVersion(String? value) =>
super.noSuchMethod(Invocation.setter(#serverVersion, value), returnValueForMissingStub: null);
set serverVersion(String? value) => super.noSuchMethod(
Invocation.setter(#serverVersion, value),
returnValueForMissingStub: null,
);
@override
set applicationVersion(_i4.PackageInfo? value) => super.noSuchMethod(
@@ -103,20 +115,28 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
);
@override
set metadata(Map<String, String>? value) =>
super.noSuchMethod(Invocation.setter(#metadata, value), returnValueForMissingStub: null);
set metadata(Map<String, String>? value) => super.noSuchMethod(
Invocation.setter(#metadata, value),
returnValueForMissingStub: null,
);
@override
set state(_i3.AuthState? value) =>
super.noSuchMethod(Invocation.setter(#state, value), returnValueForMissingStub: null);
set state(_i3.AuthState? value) => super.noSuchMethod(
Invocation.setter(#state, value),
returnValueForMissingStub: null,
);
@override
set client(_i2.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i2.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
set dataInit(bool? value) =>
super.noSuchMethod(Invocation.setter(#dataInit, value), returnValueForMissingStub: null);
set dataInit(bool? value) => super.noSuchMethod(
Invocation.setter(#dataInit, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
@@ -173,7 +193,9 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
#serverUrl: serverUrl,
#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>);
@@ -185,8 +207,15 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
String? apiToken,
) =>
(super.noSuchMethod(
Invocation.method(#login, [username, password, serverUrl, apiToken]),
returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
Invocation.method(#login, [
username,
password,
serverUrl,
apiToken,
]),
returnValue: _i5.Future<_i3.LoginActions>.value(
_i3.LoginActions.update,
),
)
as _i5.Future<_i3.LoginActions>);
@@ -195,7 +224,10 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
(super.noSuchMethod(
Invocation.method(#getServerUrlFromPrefs, []),
returnValue: _i5.Future<String>.value(
_i6.dummyValue<String>(this, Invocation.method(#getServerUrlFromPrefs, [])),
_i6.dummyValue<String>(
this,
Invocation.method(#getServerUrlFromPrefs, []),
),
),
)
as _i5.Future<String>);
@@ -222,7 +254,10 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
String getAppNameHeader() =>
(super.noSuchMethod(
Invocation.method(#getAppNameHeader, []),
returnValue: _i6.dummyValue<String>(this, Invocation.method(#getAppNameHeader, [])),
returnValue: _i6.dummyValue<String>(
this,
Invocation.method(#getAppNameHeader, []),
),
)
as String);
@@ -239,12 +274,16 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [WgerBaseProvider].
@@ -272,23 +311,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
as _i2.Client);
@override
set auth(_i3.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i3.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i2.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i2.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -326,15 +376,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i5.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -343,7 +400,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i5.Future<_i2.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i5.Future<_i2.Response>);
@@ -362,7 +422,10 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#head, [url], {#headers: headers}),
returnValue: _i5.Future<_i2.Response>.value(
_FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})),
_FakeResponse_3(
this,
Invocation.method(#head, [url], {#headers: headers}),
),
),
)
as _i5.Future<_i2.Response>);
@@ -372,7 +435,10 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#get, [url], {#headers: headers}),
returnValue: _i5.Future<_i2.Response>.value(
_FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})),
_FakeResponse_3(
this,
Invocation.method(#get, [url], {#headers: headers}),
),
),
)
as _i5.Future<_i2.Response>);
@@ -385,7 +451,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i9.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#post,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i5.Future<_i2.Response>.value(
_FakeResponse_3(
this,
@@ -407,7 +477,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i9.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#put,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i5.Future<_i2.Response>.value(
_FakeResponse_3(
this,
@@ -429,7 +503,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i9.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#patch,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i5.Future<_i2.Response>.value(
_FakeResponse_3(
this,
@@ -474,13 +552,19 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#read, [url], {#headers: headers}),
returnValue: _i5.Future<String>.value(
_i6.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
_i6.dummyValue<String>(
this,
Invocation.method(#read, [url], {#headers: headers}),
),
),
)
as _i5.Future<String>);
@override
_i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
_i5.Future<_i10.Uint8List> readBytes(
Uri? url, {
Map<String, String>? headers,
}) =>
(super.noSuchMethod(
Invocation.method(#readBytes, [url], {#headers: headers}),
returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)),
@@ -492,12 +576,17 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#send, [request]),
returnValue: _i5.Future<_i2.StreamedResponse>.value(
_FakeStreamedResponse_4(this, Invocation.method(#send, [request])),
_FakeStreamedResponse_4(
this,
Invocation.method(#send, [request]),
),
),
)
as _i5.Future<_i2.StreamedResponse>);
@override
void close() =>
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
void close() => super.noSuchMethod(
Invocation.method(#close, []),
returnValueForMissingStub: null,
);
}

View File

@@ -48,7 +48,10 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#head, [url], {#headers: headers}),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})),
_FakeResponse_0(
this,
Invocation.method(#head, [url], {#headers: headers}),
),
),
)
as _i3.Future<_i2.Response>);
@@ -58,7 +61,10 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#get, [url], {#headers: headers}),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})),
_FakeResponse_0(
this,
Invocation.method(#get, [url], {#headers: headers}),
),
),
)
as _i3.Future<_i2.Response>);
@@ -71,7 +77,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i4.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#post,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(
this,
@@ -93,7 +103,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i4.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#put,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(
this,
@@ -115,7 +129,11 @@ class MockClient extends _i1.Mock implements _i2.Client {
_i4.Encoding? encoding,
}) =>
(super.noSuchMethod(
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
Invocation.method(
#patch,
[url],
{#headers: headers, #body: body, #encoding: encoding},
),
returnValue: _i3.Future<_i2.Response>.value(
_FakeResponse_0(
this,
@@ -160,13 +178,19 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#read, [url], {#headers: headers}),
returnValue: _i3.Future<String>.value(
_i5.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
_i5.dummyValue<String>(
this,
Invocation.method(#read, [url], {#headers: headers}),
),
),
)
as _i3.Future<String>);
@override
_i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
_i3.Future<_i6.Uint8List> readBytes(
Uri? url, {
Map<String, String>? headers,
}) =>
(super.noSuchMethod(
Invocation.method(#readBytes, [url], {#headers: headers}),
returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
@@ -178,12 +202,17 @@ class MockClient extends _i1.Mock implements _i2.Client {
(super.noSuchMethod(
Invocation.method(#send, [request]),
returnValue: _i3.Future<_i2.StreamedResponse>.value(
_FakeStreamedResponse_1(this, Invocation.method(#send, [request])),
_FakeStreamedResponse_1(
this,
Invocation.method(#send, [request]),
),
),
)
as _i3.Future<_i2.StreamedResponse>);
@override
void close() =>
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
void close() => super.noSuchMethod(
Invocation.method(#close, []),
returnValueForMissingStub: null,
);
}

View File

@@ -44,7 +44,9 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i2.SharedPreferenc
_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?>>);
@@ -58,7 +60,10 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i2.SharedPreferenc
@override
_i3.Future<int?> getInt(String? key) =>
(super.noSuchMethod(Invocation.method(#getInt, [key]), returnValue: _i3.Future<int?>.value())
(super.noSuchMethod(
Invocation.method(#getInt, [key]),
returnValue: _i3.Future<int?>.value(),
)
as _i3.Future<int?>);
@override

View File

@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@override
List<_i5.Routine> get items =>
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
(super.noSuchMethod(
Invocation.getter(#items),
returnValue: <_i5.Routine>[],
)
as List<_i5.Routine>);
@override
List<_i3.WeightUnit> get weightUnits =>
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
(super.noSuchMethod(
Invocation.getter(#weightUnits),
returnValue: <_i3.WeightUnit>[],
)
as List<_i3.WeightUnit>);
@override
_i3.WeightUnit get defaultWeightUnit =>
(super.noSuchMethod(
Invocation.getter(#defaultWeightUnit),
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
returnValue: _FakeWeightUnit_1(
this,
Invocation.getter(#defaultWeightUnit),
),
)
as _i3.WeightUnit);
@override
List<_i4.RepetitionUnit> get repetitionUnits =>
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
(super.noSuchMethod(
Invocation.getter(#repetitionUnits),
returnValue: <_i4.RepetitionUnit>[],
)
as List<_i4.RepetitionUnit>);
@override
_i4.RepetitionUnit get defaultRepetitionUnit =>
(super.noSuchMethod(
Invocation.getter(#defaultRepetitionUnit),
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
returnValue: _FakeRepetitionUnit_2(
this,
Invocation.getter(#defaultRepetitionUnit),
),
)
as _i4.RepetitionUnit);
@override
set activeRoutine(_i5.Routine? value) =>
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
Invocation.setter(#activeRoutine, value),
returnValueForMissingStub: null,
);
@override
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i3.WeightUnit findWeightUnitById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findWeightUnitById, [id]),
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
returnValue: _FakeWeightUnit_1(
this,
Invocation.method(#findWeightUnitById, [id]),
),
)
as _i3.WeightUnit);
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
@override
List<_i5.Routine> getPlans() =>
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
(super.noSuchMethod(
Invocation.method(#getPlans, []),
returnValue: <_i5.Routine>[],
)
as List<_i5.Routine>);
@override
_i5.Routine findById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findById, [id]),
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
returnValue: _FakeRoutine_3(
this,
Invocation.method(#findById, [id]),
),
)
as _i5.Routine);
@override
int findIndexById(int? id) =>
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
(super.noSuchMethod(
Invocation.method(#findIndexById, [id]),
returnValue: 0,
)
as int);
@override
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
Map<int, _i15.Exercise>? exercises,
}) =>
(super.noSuchMethod(
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
Invocation.method(
#setExercisesAndUnits,
[entries],
{#exercises: exercises},
),
returnValue: _i13.Future<void>.value(),
returnValueForMissingStub: _i13.Future<void>.value(),
)
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
(super.noSuchMethod(
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
returnValue: _i13.Future<_i5.Routine>.value(
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
_FakeRoutine_3(
this,
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
),
),
)
as _i13.Future<_i5.Routine>);
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
(super.noSuchMethod(
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
returnValue: _i13.Future<_i5.Routine>.value(
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
_FakeRoutine_3(
this,
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
),
),
)
as _i13.Future<_i5.Routine>);
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
as _i13.Future<void>);
@override
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
_i13.Future<_i8.SlotEntry> addSlotEntry(
_i8.SlotEntry? entry,
int? routineId,
) =>
(super.noSuchMethod(
Invocation.method(#addSlotEntry, [entry, routineId]),
returnValue: _i13.Future<_i8.SlotEntry>.value(
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
_FakeSlotEntry_6(
this,
Invocation.method(#addSlotEntry, [entry, routineId]),
),
),
)
as _i13.Future<_i8.SlotEntry>);
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
String getConfigUrl(_i8.ConfigType? type) =>
(super.noSuchMethod(
Invocation.method(#getConfigUrl, [type]),
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
returnValue: _i16.dummyValue<String>(
this,
Invocation.method(#getConfigUrl, [type]),
),
)
as String);
@override
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
_i13.Future<_i9.BaseConfig> editConfig(
_i9.BaseConfig? config,
_i8.ConfigType? type,
) =>
(super.noSuchMethod(
Invocation.method(#editConfig, [config, type]),
returnValue: _i13.Future<_i9.BaseConfig>.value(
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
_FakeBaseConfig_7(
this,
Invocation.method(#editConfig, [config, type]),
),
),
)
as _i13.Future<_i9.BaseConfig>);
@override
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
_i13.Future<_i9.BaseConfig> addConfig(
_i9.BaseConfig? config,
_i8.ConfigType? type,
) =>
(super.noSuchMethod(
Invocation.method(#addConfig, [config, type]),
returnValue: _i13.Future<_i9.BaseConfig>.value(
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
_FakeBaseConfig_7(
this,
Invocation.method(#addConfig, [config, type]),
),
),
)
as _i13.Future<_i9.BaseConfig>);
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
as _i13.Future<void>);
@override
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
_i13.Future<void> handleConfig(
_i8.SlotEntry? entry,
num? value,
_i8.ConfigType? type,
) =>
(super.noSuchMethod(
Invocation.method(#handleConfig, [entry, value, type]),
returnValue: _i13.Future<void>.value(),
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
_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
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
_i13.Future<_i10.WorkoutSession> addSession(
_i10.WorkoutSession? session,
int? routineId,
) =>
(super.noSuchMethod(
Invocation.method(#addSession, [session, routineId]),
returnValue: _i13.Future<_i10.WorkoutSession>.value(
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
_FakeWorkoutSession_8(
this,
Invocation.method(#addSession, [session, routineId]),
),
),
)
as _i13.Future<_i10.WorkoutSession>);
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
(super.noSuchMethod(
Invocation.method(#editSession, [session]),
returnValue: _i13.Future<_i10.WorkoutSession>.value(
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
_FakeWorkoutSession_8(
this,
Invocation.method(#editSession, [session]),
),
),
)
as _i13.Future<_i10.WorkoutSession>);
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -66,23 +66,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
as _i3.Client);
@override
set auth(_i2.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -120,15 +131,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i5.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -137,7 +155,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i5.Future<_i3.Response>);

View File

@@ -66,23 +66,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
as _i3.Client);
@override
set auth(_i2.AuthProvider? value) =>
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
Invocation.setter(#auth, value),
returnValueForMissingStub: null,
);
@override
set client(_i3.Client? value) =>
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
set client(_i3.Client? value) => super.noSuchMethod(
Invocation.setter(#client, value),
returnValueForMissingStub: null,
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
Invocation.method(#getDefaultHeaders, [], {
#includeAuth: includeAuth,
}),
returnValue: <String, String>{},
)
as Map<String, String>);
@override
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
Uri makeUrl(
String? path, {
int? id,
String? objectMethod,
Map<String, dynamic>? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#makeUrl,
@@ -120,15 +131,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
(super.noSuchMethod(
Invocation.method(#post, [data, 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
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
_i5.Future<Map<String, dynamic>> patch(
Map<String, dynamic>? data,
Uri? uri,
) =>
(super.noSuchMethod(
Invocation.method(#patch, [data, 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>>);
@@ -137,7 +155,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
(super.noSuchMethod(
Invocation.method(#deleteRequest, [url, id]),
returnValue: _i5.Future<_i3.Response>.value(
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
_FakeResponse_3(
this,
Invocation.method(#deleteRequest, [url, id]),
),
),
)
as _i5.Future<_i3.Response>);

View File

@@ -84,32 +84,45 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@override
List<_i3.WeightEntry> get items =>
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i3.WeightEntry>[])
(super.noSuchMethod(
Invocation.getter(#items),
returnValue: <_i3.WeightEntry>[],
)
as List<_i3.WeightEntry>);
@override
set items(List<_i3.WeightEntry>? entries) =>
super.noSuchMethod(Invocation.setter(#items, entries), returnValueForMissingStub: null);
set items(List<_i3.WeightEntry>? entries) => super.noSuchMethod(
Invocation.setter(#items, entries),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i3.WeightEntry findById(int? id) =>
(super.noSuchMethod(
Invocation.method(#findById, [id]),
returnValue: _FakeWeightEntry_1(this, Invocation.method(#findById, [id])),
returnValue: _FakeWeightEntry_1(
this,
Invocation.method(#findById, [id]),
),
)
as _i3.WeightEntry);
@@ -121,7 +134,9 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
_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>>);
@@ -166,12 +181,16 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [UserProvider].
@@ -184,14 +203,20 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
@override
_i14.ThemeMode get themeMode =>
(super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i14.ThemeMode.system)
(super.noSuchMethod(
Invocation.getter(#themeMode),
returnValue: _i14.ThemeMode.system,
)
as _i14.ThemeMode);
@override
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -199,33 +224,46 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
_i4.SharedPreferencesAsync get prefs =>
(super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakeSharedPreferencesAsync_2(this, Invocation.getter(#prefs)),
returnValue: _FakeSharedPreferencesAsync_2(
this,
Invocation.getter(#prefs),
),
)
as _i4.SharedPreferencesAsync);
@override
set themeMode(_i14.ThemeMode? value) =>
super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null);
set themeMode(_i14.ThemeMode? value) => super.noSuchMethod(
Invocation.setter(#themeMode, value),
returnValueForMissingStub: null,
);
@override
set prefs(_i4.SharedPreferencesAsync? value) =>
super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null);
set prefs(_i4.SharedPreferencesAsync? value) => super.noSuchMethod(
Invocation.setter(#prefs, value),
returnValueForMissingStub: null,
);
@override
set profile(_i15.Profile? value) =>
super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null);
set profile(_i15.Profile? value) => super.noSuchMethod(
Invocation.setter(#profile, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
void setThemeMode(_i14.ThemeMode? mode) =>
super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null);
void setThemeMode(_i14.ThemeMode? mode) => super.noSuchMethod(
Invocation.method(#setThemeMode, [mode]),
returnValueForMissingStub: null,
);
@override
_i11.Future<void> fetchAndSetProfile() =>
@@ -267,12 +305,16 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}
/// A class which mocks [NutritionPlansProvider].
@@ -287,7 +329,10 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
_i2.WgerBaseProvider get baseProvider =>
(super.noSuchMethod(
Invocation.getter(#baseProvider),
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
returnValue: _FakeWgerBaseProvider_0(
this,
Invocation.getter(#baseProvider),
),
)
as _i2.WgerBaseProvider);
@@ -295,92 +340,84 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
_i5.IngredientDatabase get database =>
(super.noSuchMethod(
Invocation.getter(#database),
returnValue: _FakeIngredientDatabase_3(this, Invocation.getter(#database)),
returnValue: _FakeIngredientDatabase_3(
this,
Invocation.getter(#database),
),
)
as _i5.IngredientDatabase);
@override
List<_i9.Ingredient> get ingredients =>
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i9.Ingredient>[])
(super.noSuchMethod(
Invocation.getter(#ingredients),
returnValue: <_i9.Ingredient>[],
)
as List<_i9.Ingredient>);
@override
List<_i6.NutritionalPlan> get items =>
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i6.NutritionalPlan>[])
(super.noSuchMethod(
Invocation.getter(#items),
returnValue: <_i6.NutritionalPlan>[],
)
as List<_i6.NutritionalPlan>);
@override
set database(_i5.IngredientDatabase? value) =>
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
set database(_i5.IngredientDatabase? value) => super.noSuchMethod(
Invocation.setter(#database, value),
returnValueForMissingStub: null,
);
@override
set ingredients(List<_i9.Ingredient>? value) =>
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
set ingredients(List<_i9.Ingredient>? value) => super.noSuchMethod(
Invocation.setter(#ingredients, value),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() =>
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
void clear() => super.noSuchMethod(
Invocation.method(#clear, []),
returnValueForMissingStub: null,
);
@override
_i6.NutritionalPlan findById(int? id) =>
_i11.Stream<_i6.NutritionalPlan?> watchNutritionPlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#findById, [id]),
returnValue: _FakeNutritionalPlan_4(this, Invocation.method(#findById, [id])),
Invocation.method(#watchNutritionPlan, [id]),
returnValue: _i11.Stream<_i6.NutritionalPlan?>.empty(),
)
as _i6.NutritionalPlan);
as _i11.Stream<_i6.NutritionalPlan?>);
@override
_i7.Meal? findMealById(int? id) =>
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i7.Meal?);
@override
_i11.Future<void> fetchAndSetAllPlansSparse() =>
_i11.Stream<_i6.NutritionalPlan> watchNutritionPlanLast() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansSparse, []),
returnValue: _i11.Future<void>.value(),
returnValueForMissingStub: _i11.Future<void>.value(),
Invocation.method(#watchNutritionPlanLast, []),
returnValue: _i11.Stream<_i6.NutritionalPlan>.empty(),
)
as _i11.Future<void>);
as _i11.Stream<_i6.NutritionalPlan>);
@override
_i11.Future<void> fetchAndSetAllPlansFull() =>
_i11.Stream<List<_i6.NutritionalPlan>> watchNutritionPlans() =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetAllPlansFull, []),
returnValue: _i11.Future<void>.value(),
returnValueForMissingStub: _i11.Future<void>.value(),
Invocation.method(#watchNutritionPlans, []),
returnValue: _i11.Stream<List<_i6.NutritionalPlan>>.empty(),
)
as _i11.Future<void>);
@override
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanSparse, [planId]),
returnValue: _i11.Future<_i6.NutritionalPlan>.value(
_FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
),
)
as _i11.Future<_i6.NutritionalPlan>);
@override
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
(super.noSuchMethod(
Invocation.method(#fetchAndSetPlanFull, [planId]),
returnValue: _i11.Future<_i6.NutritionalPlan>.value(
_FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
),
)
as _i11.Future<_i6.NutritionalPlan>);
as _i11.Stream<List<_i6.NutritionalPlan>>);
@override
_i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) =>
(super.noSuchMethod(
Invocation.method(#addPlan, [planData]),
returnValue: _i11.Future<_i6.NutritionalPlan>.value(
_FakeNutritionalPlan_4(this, Invocation.method(#addPlan, [planData])),
_FakeNutritionalPlan_4(
this,
Invocation.method(#addPlan, [planData]),
),
),
)
as _i11.Future<_i6.NutritionalPlan>);
@@ -395,7 +432,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
as _i11.Future<void>);
@override
_i11.Future<void> deletePlan(int? id) =>
_i11.Future<void> deletePlan(String? id) =>
(super.noSuchMethod(
Invocation.method(#deletePlan, [id]),
returnValue: _i11.Future<void>.value(),
@@ -404,7 +441,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
as _i11.Future<void>);
@override
_i11.Future<_i7.Meal> addMeal(_i7.Meal? meal, int? planId) =>
_i11.Future<_i7.Meal> addMeal(_i7.Meal? meal, String? planId) =>
(super.noSuchMethod(
Invocation.method(#addMeal, [meal, planId]),
returnValue: _i11.Future<_i7.Meal>.value(
@@ -433,11 +470,17 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
as _i11.Future<void>);
@override
_i11.Future<_i8.MealItem> addMealItem(_i8.MealItem? mealItem, _i7.Meal? meal) =>
_i11.Future<_i8.MealItem> addMealItem(
_i8.MealItem? mealItem,
_i7.Meal? meal,
) =>
(super.noSuchMethod(
Invocation.method(#addMealItem, [mealItem, meal]),
returnValue: _i11.Future<_i8.MealItem>.value(
_FakeMealItem_6(this, Invocation.method(#addMealItem, [mealItem, meal])),
_FakeMealItem_6(
this,
Invocation.method(#addMealItem, [mealItem, meal]),
),
),
)
as _i11.Future<_i8.MealItem>);
@@ -466,11 +509,19 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
_i5.IngredientDatabase? database,
}) =>
(super.noSuchMethod(
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
returnValue: _i11.Future<_i9.Ingredient>.value(
_FakeIngredient_7(
this,
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
Invocation.method(
#fetchIngredient,
[ingredientId],
{#database: database},
),
),
),
)
@@ -497,7 +548,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
[name],
{#languageCode: languageCode, #searchEnglish: searchEnglish},
),
returnValue: _i11.Future<List<_i9.Ingredient>>.value(<_i9.Ingredient>[]),
returnValue: _i11.Future<List<_i9.Ingredient>>.value(
<_i9.Ingredient>[],
),
)
as _i11.Future<List<_i9.Ingredient>>);
@@ -521,18 +574,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
@override
_i11.Future<void> logIngredientToDiary(
_i8.MealItem? mealItem,
int? planId, [
String? planId, [
DateTime? dateTime,
]) =>
(super.noSuchMethod(
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
Invocation.method(#logIngredientToDiary, [
mealItem,
planId,
dateTime,
]),
returnValue: _i11.Future<void>.value(),
returnValueForMissingStub: _i11.Future<void>.value(),
)
as _i11.Future<void>);
@override
_i11.Future<void> deleteLog(int? logId, int? planId) =>
_i11.Future<void> deleteLog(String? logId, String? planId) =>
(super.noSuchMethod(
Invocation.method(#deleteLog, [logId, planId]),
returnValue: _i11.Future<void>.value(),
@@ -562,10 +619,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
);
@override
void dispose() =>
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(#dispose, []),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null,
);
}

View File

@@ -7,6 +7,7 @@
#include "generated_plugin_registrant.h"
#include <file_selector_windows/file_selector_windows.h>
#include <powersync_flutter_libs/powersync_flutter_libs_plugin.h>
#include <rive_common/rive_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
@@ -14,6 +15,8 @@
void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
PowersyncFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PowersyncFlutterLibsPlugin"));
RivePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("RivePlugin"));
Sqlite3FlutterLibsPluginRegisterWithRegistrar(

View File

@@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows
powersync_flutter_libs
rive_common
sqlite3_flutter_libs
url_launcher_windows