Consistently use "fiber"

This commit is contained in:
Roland Geider
2024-05-23 17:54:50 +02:00
parent 239e1a1caa
commit 5d237e1ddf
88 changed files with 1079 additions and 621 deletions

View File

@@ -3,25 +3,30 @@
part of 'exercise_database.dart';
// ignore_for_file: type=lint
class $ExercisesTable extends Exercises with TableInfo<$ExercisesTable, ExerciseTable> {
class $ExercisesTable extends Exercises
with TableInfo<$ExercisesTable, ExerciseTable> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$ExercisesTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dataMeta = const VerificationMeta('data');
@override
late final GeneratedColumn<String> data = GeneratedColumn<String>('data', aliasedName, false,
late final GeneratedColumn<String> data = GeneratedColumn<String>(
'data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _lastUpdateMeta = const VerificationMeta('lastUpdate');
static const VerificationMeta _lastUpdateMeta =
const VerificationMeta('lastUpdate');
@override
late final GeneratedColumn<DateTime> lastUpdate = GeneratedColumn<DateTime>(
'last_update', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _lastFetchedMeta = const VerificationMeta('lastFetched');
static const VerificationMeta _lastFetchedMeta =
const VerificationMeta('lastFetched');
@override
late final GeneratedColumn<DateTime> lastFetched = GeneratedColumn<DateTime>(
'last_fetched', aliasedName, false,
@@ -44,19 +49,24 @@ class $ExercisesTable extends Exercises with TableInfo<$ExercisesTable, Exercise
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_update')) {
context.handle(
_lastUpdateMeta, lastUpdate.isAcceptableOrUnknown(data['last_update']!, _lastUpdateMeta));
_lastUpdateMeta,
lastUpdate.isAcceptableOrUnknown(
data['last_update']!, _lastUpdateMeta));
} else if (isInserting) {
context.missing(_lastUpdateMeta);
}
if (data.containsKey('last_fetched')) {
context.handle(_lastFetchedMeta,
lastFetched.isAcceptableOrUnknown(data['last_fetched']!, _lastFetchedMeta));
context.handle(
_lastFetchedMeta,
lastFetched.isAcceptableOrUnknown(
data['last_fetched']!, _lastFetchedMeta));
} else if (isInserting) {
context.missing(_lastFetchedMeta);
}
@@ -69,8 +79,10 @@ class $ExercisesTable extends Exercises with TableInfo<$ExercisesTable, Exercise
ExerciseTable map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return ExerciseTable(
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'])!,
lastUpdate: attachedDatabase.typeMapping
.read(DriftSqlType.dateTime, data['${effectivePrefix}last_update'])!,
lastFetched: attachedDatabase.typeMapping
@@ -94,7 +106,10 @@ class ExerciseTable extends DataClass implements Insertable<ExerciseTable> {
/// ourselves a lot of requests if we don't check too often
final DateTime lastFetched;
const ExerciseTable(
{required this.id, required this.data, required this.lastUpdate, required this.lastFetched});
{required this.id,
required this.data,
required this.lastUpdate,
required this.lastFetched});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
@@ -114,7 +129,8 @@ class ExerciseTable extends DataClass implements Insertable<ExerciseTable> {
);
}
factory ExerciseTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
factory ExerciseTable.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ExerciseTable(
id: serializer.fromJson<int>(json['id']),
@@ -134,7 +150,11 @@ class ExerciseTable extends DataClass implements Insertable<ExerciseTable> {
};
}
ExerciseTable copyWith({int? id, String? data, DateTime? lastUpdate, DateTime? lastFetched}) =>
ExerciseTable copyWith(
{int? id,
String? data,
DateTime? lastUpdate,
DateTime? lastFetched}) =>
ExerciseTable(
id: id ?? this.id,
data: data ?? this.data,
@@ -259,14 +279,15 @@ class $MusclesTable extends Muscles with TableInfo<$MusclesTable, MuscleTable> {
$MusclesTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dataMeta = const VerificationMeta('data');
@override
late final GeneratedColumnWithTypeConverter<Muscle, String> data = GeneratedColumn<String>(
'data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<Muscle>($MusclesTable.$converterdata);
late final GeneratedColumnWithTypeConverter<Muscle, String> data =
GeneratedColumn<String>('data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<Muscle>($MusclesTable.$converterdata);
@override
List<GeneratedColumn> get $columns => [id, data];
@override
@@ -294,9 +315,10 @@ class $MusclesTable extends Muscles with TableInfo<$MusclesTable, MuscleTable> {
MuscleTable map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return MuscleTable(
id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $MusclesTable.$converterdata.fromSql(
attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $MusclesTable.$converterdata.fromSql(attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
);
}
@@ -329,7 +351,8 @@ class MuscleTable extends DataClass implements Insertable<MuscleTable> {
);
}
factory MuscleTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
factory MuscleTable.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return MuscleTable(
id: serializer.fromJson<int>(json['id']),
@@ -393,7 +416,8 @@ class MusclesCompanion extends UpdateCompanion<MuscleTable> {
});
}
MusclesCompanion copyWith({Value<int>? id, Value<Muscle>? data, Value<int>? rowid}) {
MusclesCompanion copyWith(
{Value<int>? id, Value<Muscle>? data, Value<int>? rowid}) {
return MusclesCompanion(
id: id ?? this.id,
data: data ?? this.data,
@@ -408,7 +432,8 @@ class MusclesCompanion extends UpdateCompanion<MuscleTable> {
map['id'] = Variable<int>(id.value);
}
if (data.present) {
map['data'] = Variable<String>($MusclesTable.$converterdata.toSql(data.value));
map['data'] =
Variable<String>($MusclesTable.$converterdata.toSql(data.value));
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
@@ -427,21 +452,23 @@ class MusclesCompanion extends UpdateCompanion<MuscleTable> {
}
}
class $EquipmentsTable extends Equipments with TableInfo<$EquipmentsTable, EquipmentTable> {
class $EquipmentsTable extends Equipments
with TableInfo<$EquipmentsTable, EquipmentTable> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$EquipmentsTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dataMeta = const VerificationMeta('data');
@override
late final GeneratedColumnWithTypeConverter<Equipment, String> data = GeneratedColumn<String>(
'data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<Equipment>($EquipmentsTable.$converterdata);
late final GeneratedColumnWithTypeConverter<Equipment, String> data =
GeneratedColumn<String>('data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<Equipment>($EquipmentsTable.$converterdata);
@override
List<GeneratedColumn> get $columns => [id, data];
@override
@@ -469,9 +496,10 @@ class $EquipmentsTable extends Equipments with TableInfo<$EquipmentsTable, Equip
EquipmentTable map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return EquipmentTable(
id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $EquipmentsTable.$converterdata.fromSql(
attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $EquipmentsTable.$converterdata.fromSql(attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
);
}
@@ -480,7 +508,8 @@ class $EquipmentsTable extends Equipments with TableInfo<$EquipmentsTable, Equip
return $EquipmentsTable(attachedDatabase, alias);
}
static TypeConverter<Equipment, String> $converterdata = const EquipmentConverter();
static TypeConverter<Equipment, String> $converterdata =
const EquipmentConverter();
}
class EquipmentTable extends DataClass implements Insertable<EquipmentTable> {
@@ -492,7 +521,8 @@ class EquipmentTable extends DataClass implements Insertable<EquipmentTable> {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
{
map['data'] = Variable<String>($EquipmentsTable.$converterdata.toSql(data));
map['data'] =
Variable<String>($EquipmentsTable.$converterdata.toSql(data));
}
return map;
}
@@ -504,7 +534,8 @@ class EquipmentTable extends DataClass implements Insertable<EquipmentTable> {
);
}
factory EquipmentTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
factory EquipmentTable.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return EquipmentTable(
id: serializer.fromJson<int>(json['id']),
@@ -538,7 +569,9 @@ class EquipmentTable extends DataClass implements Insertable<EquipmentTable> {
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is EquipmentTable && other.id == this.id && other.data == this.data);
(other is EquipmentTable &&
other.id == this.id &&
other.data == this.data);
}
class EquipmentsCompanion extends UpdateCompanion<EquipmentTable> {
@@ -568,7 +601,8 @@ class EquipmentsCompanion extends UpdateCompanion<EquipmentTable> {
});
}
EquipmentsCompanion copyWith({Value<int>? id, Value<Equipment>? data, Value<int>? rowid}) {
EquipmentsCompanion copyWith(
{Value<int>? id, Value<Equipment>? data, Value<int>? rowid}) {
return EquipmentsCompanion(
id: id ?? this.id,
data: data ?? this.data,
@@ -583,7 +617,8 @@ class EquipmentsCompanion extends UpdateCompanion<EquipmentTable> {
map['id'] = Variable<int>(id.value);
}
if (data.present) {
map['data'] = Variable<String>($EquipmentsTable.$converterdata.toSql(data.value));
map['data'] =
Variable<String>($EquipmentsTable.$converterdata.toSql(data.value));
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
@@ -602,14 +637,16 @@ class EquipmentsCompanion extends UpdateCompanion<EquipmentTable> {
}
}
class $CategoriesTable extends Categories with TableInfo<$CategoriesTable, CategoryTable> {
class $CategoriesTable extends Categories
with TableInfo<$CategoriesTable, CategoryTable> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CategoriesTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dataMeta = const VerificationMeta('data');
@override
@@ -644,9 +681,10 @@ class $CategoriesTable extends Categories with TableInfo<$CategoriesTable, Categ
CategoryTable map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CategoryTable(
id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $CategoriesTable.$converterdata.fromSql(
attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $CategoriesTable.$converterdata.fromSql(attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
);
}
@@ -655,7 +693,8 @@ class $CategoriesTable extends Categories with TableInfo<$CategoriesTable, Categ
return $CategoriesTable(attachedDatabase, alias);
}
static TypeConverter<ExerciseCategory, String> $converterdata = const ExerciseCategoryConverter();
static TypeConverter<ExerciseCategory, String> $converterdata =
const ExerciseCategoryConverter();
}
class CategoryTable extends DataClass implements Insertable<CategoryTable> {
@@ -667,7 +706,8 @@ class CategoryTable extends DataClass implements Insertable<CategoryTable> {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
{
map['data'] = Variable<String>($CategoriesTable.$converterdata.toSql(data));
map['data'] =
Variable<String>($CategoriesTable.$converterdata.toSql(data));
}
return map;
}
@@ -679,7 +719,8 @@ class CategoryTable extends DataClass implements Insertable<CategoryTable> {
);
}
factory CategoryTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
factory CategoryTable.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CategoryTable(
id: serializer.fromJson<int>(json['id']),
@@ -713,7 +754,9 @@ class CategoryTable extends DataClass implements Insertable<CategoryTable> {
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CategoryTable && other.id == this.id && other.data == this.data);
(other is CategoryTable &&
other.id == this.id &&
other.data == this.data);
}
class CategoriesCompanion extends UpdateCompanion<CategoryTable> {
@@ -743,7 +786,8 @@ class CategoriesCompanion extends UpdateCompanion<CategoryTable> {
});
}
CategoriesCompanion copyWith({Value<int>? id, Value<ExerciseCategory>? data, Value<int>? rowid}) {
CategoriesCompanion copyWith(
{Value<int>? id, Value<ExerciseCategory>? data, Value<int>? rowid}) {
return CategoriesCompanion(
id: id ?? this.id,
data: data ?? this.data,
@@ -758,7 +802,8 @@ class CategoriesCompanion extends UpdateCompanion<CategoryTable> {
map['id'] = Variable<int>(id.value);
}
if (data.present) {
map['data'] = Variable<String>($CategoriesTable.$converterdata.toSql(data.value));
map['data'] =
Variable<String>($CategoriesTable.$converterdata.toSql(data.value));
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
@@ -777,21 +822,23 @@ class CategoriesCompanion extends UpdateCompanion<CategoryTable> {
}
}
class $LanguagesTable extends Languages with TableInfo<$LanguagesTable, LanguagesTable> {
class $LanguagesTable extends Languages
with TableInfo<$LanguagesTable, LanguagesTable> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$LanguagesTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dataMeta = const VerificationMeta('data');
@override
late final GeneratedColumnWithTypeConverter<Language, String> data = GeneratedColumn<String>(
'data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<Language>($LanguagesTable.$converterdata);
late final GeneratedColumnWithTypeConverter<Language, String> data =
GeneratedColumn<String>('data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<Language>($LanguagesTable.$converterdata);
@override
List<GeneratedColumn> get $columns => [id, data];
@override
@@ -819,9 +866,10 @@ class $LanguagesTable extends Languages with TableInfo<$LanguagesTable, Language
LanguagesTable map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return LanguagesTable(
id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $LanguagesTable.$converterdata.fromSql(
attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
data: $LanguagesTable.$converterdata.fromSql(attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}data'])!),
);
}
@@ -830,7 +878,8 @@ class $LanguagesTable extends Languages with TableInfo<$LanguagesTable, Language
return $LanguagesTable(attachedDatabase, alias);
}
static TypeConverter<Language, String> $converterdata = const LanguageConverter();
static TypeConverter<Language, String> $converterdata =
const LanguageConverter();
}
class LanguagesTable extends DataClass implements Insertable<LanguagesTable> {
@@ -842,7 +891,8 @@ class LanguagesTable extends DataClass implements Insertable<LanguagesTable> {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
{
map['data'] = Variable<String>($LanguagesTable.$converterdata.toSql(data));
map['data'] =
Variable<String>($LanguagesTable.$converterdata.toSql(data));
}
return map;
}
@@ -854,7 +904,8 @@ class LanguagesTable extends DataClass implements Insertable<LanguagesTable> {
);
}
factory LanguagesTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
factory LanguagesTable.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return LanguagesTable(
id: serializer.fromJson<int>(json['id']),
@@ -888,7 +939,9 @@ class LanguagesTable extends DataClass implements Insertable<LanguagesTable> {
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is LanguagesTable && other.id == this.id && other.data == this.data);
(other is LanguagesTable &&
other.id == this.id &&
other.data == this.data);
}
class LanguagesCompanion extends UpdateCompanion<LanguagesTable> {
@@ -918,7 +971,8 @@ class LanguagesCompanion extends UpdateCompanion<LanguagesTable> {
});
}
LanguagesCompanion copyWith({Value<int>? id, Value<Language>? data, Value<int>? rowid}) {
LanguagesCompanion copyWith(
{Value<int>? id, Value<Language>? data, Value<int>? rowid}) {
return LanguagesCompanion(
id: id ?? this.id,
data: data ?? this.data,
@@ -933,7 +987,8 @@ class LanguagesCompanion extends UpdateCompanion<LanguagesTable> {
map['id'] = Variable<int>(id.value);
}
if (data.present) {
map['data'] = Variable<String>($LanguagesTable.$converterdata.toSql(data.value));
map['data'] =
Variable<String>($LanguagesTable.$converterdata.toSql(data.value));
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
@@ -996,9 +1051,12 @@ class $$ExercisesTableTableManager extends RootTableManager<
: super(TableManagerState(
db: db,
table: table,
filteringComposer: $$ExercisesTableFilterComposer(ComposerState(db, table)),
orderingComposer: $$ExercisesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) => $$ExercisesTableProcessedTableManager(p),
filteringComposer:
$$ExercisesTableFilterComposer(ComposerState(db, table)),
orderingComposer:
$$ExercisesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) =>
$$ExercisesTableProcessedTableManager(p),
getUpdateCompanionBuilder: ({
Value<int> id = const Value.absent(),
Value<String> data = const Value.absent(),
@@ -1042,23 +1100,28 @@ class $$ExercisesTableProcessedTableManager extends ProcessedTableManager<
$$ExercisesTableProcessedTableManager(super.$state);
}
class $$ExercisesTableFilterComposer extends FilterComposer<_$ExerciseDatabase, $ExercisesTable> {
class $$ExercisesTableFilterComposer
extends FilterComposer<_$ExerciseDatabase, $ExercisesTable> {
$$ExercisesTableFilterComposer(super.$state);
ColumnFilters<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnFilters<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnFilters<DateTime> get lastUpdate => $state.composableBuilder(
column: $state.table.lastUpdate,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnFilters<DateTime> get lastFetched => $state.composableBuilder(
column: $state.table.lastFetched,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
}
class $$ExercisesTableOrderingComposer
@@ -1066,19 +1129,23 @@ class $$ExercisesTableOrderingComposer
$$ExercisesTableOrderingComposer(super.$state);
ColumnOrderings<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<DateTime> get lastUpdate => $state.composableBuilder(
column: $state.table.lastUpdate,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<DateTime> get lastFetched => $state.composableBuilder(
column: $state.table.lastFetched,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
}
typedef $$MusclesTableInsertCompanionBuilder = MusclesCompanion Function({
@@ -1105,8 +1172,10 @@ class $$MusclesTableTableManager extends RootTableManager<
: super(TableManagerState(
db: db,
table: table,
filteringComposer: $$MusclesTableFilterComposer(ComposerState(db, table)),
orderingComposer: $$MusclesTableOrderingComposer(ComposerState(db, table)),
filteringComposer:
$$MusclesTableFilterComposer(ComposerState(db, table)),
orderingComposer:
$$MusclesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) => $$MusclesTableProcessedTableManager(p),
getUpdateCompanionBuilder: ({
Value<int> id = const Value.absent(),
@@ -1143,27 +1212,34 @@ class $$MusclesTableProcessedTableManager extends ProcessedTableManager<
$$MusclesTableProcessedTableManager(super.$state);
}
class $$MusclesTableFilterComposer extends FilterComposer<_$ExerciseDatabase, $MusclesTable> {
class $$MusclesTableFilterComposer
extends FilterComposer<_$ExerciseDatabase, $MusclesTable> {
$$MusclesTableFilterComposer(super.$state);
ColumnFilters<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<Muscle, Muscle, String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) =>
ColumnWithTypeConverterFilters(column, joinBuilders: joinBuilders));
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<Muscle, Muscle, String> get data =>
$state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnWithTypeConverterFilters(
column,
joinBuilders: joinBuilders));
}
class $$MusclesTableOrderingComposer extends OrderingComposer<_$ExerciseDatabase, $MusclesTable> {
class $$MusclesTableOrderingComposer
extends OrderingComposer<_$ExerciseDatabase, $MusclesTable> {
$$MusclesTableOrderingComposer(super.$state);
ColumnOrderings<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
}
typedef $$EquipmentsTableInsertCompanionBuilder = EquipmentsCompanion Function({
@@ -1190,9 +1266,12 @@ class $$EquipmentsTableTableManager extends RootTableManager<
: super(TableManagerState(
db: db,
table: table,
filteringComposer: $$EquipmentsTableFilterComposer(ComposerState(db, table)),
orderingComposer: $$EquipmentsTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) => $$EquipmentsTableProcessedTableManager(p),
filteringComposer:
$$EquipmentsTableFilterComposer(ComposerState(db, table)),
orderingComposer:
$$EquipmentsTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) =>
$$EquipmentsTableProcessedTableManager(p),
getUpdateCompanionBuilder: ({
Value<int> id = const Value.absent(),
Value<Equipment> data = const Value.absent(),
@@ -1228,16 +1307,20 @@ class $$EquipmentsTableProcessedTableManager extends ProcessedTableManager<
$$EquipmentsTableProcessedTableManager(super.$state);
}
class $$EquipmentsTableFilterComposer extends FilterComposer<_$ExerciseDatabase, $EquipmentsTable> {
class $$EquipmentsTableFilterComposer
extends FilterComposer<_$ExerciseDatabase, $EquipmentsTable> {
$$EquipmentsTableFilterComposer(super.$state);
ColumnFilters<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<Equipment, Equipment, String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) =>
ColumnWithTypeConverterFilters(column, joinBuilders: joinBuilders));
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<Equipment, Equipment, String> get data =>
$state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnWithTypeConverterFilters(
column,
joinBuilders: joinBuilders));
}
class $$EquipmentsTableOrderingComposer
@@ -1245,11 +1328,13 @@ class $$EquipmentsTableOrderingComposer
$$EquipmentsTableOrderingComposer(super.$state);
ColumnOrderings<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
}
typedef $$CategoriesTableInsertCompanionBuilder = CategoriesCompanion Function({
@@ -1276,9 +1361,12 @@ class $$CategoriesTableTableManager extends RootTableManager<
: super(TableManagerState(
db: db,
table: table,
filteringComposer: $$CategoriesTableFilterComposer(ComposerState(db, table)),
orderingComposer: $$CategoriesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) => $$CategoriesTableProcessedTableManager(p),
filteringComposer:
$$CategoriesTableFilterComposer(ComposerState(db, table)),
orderingComposer:
$$CategoriesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) =>
$$CategoriesTableProcessedTableManager(p),
getUpdateCompanionBuilder: ({
Value<int> id = const Value.absent(),
Value<ExerciseCategory> data = const Value.absent(),
@@ -1314,17 +1402,20 @@ class $$CategoriesTableProcessedTableManager extends ProcessedTableManager<
$$CategoriesTableProcessedTableManager(super.$state);
}
class $$CategoriesTableFilterComposer extends FilterComposer<_$ExerciseDatabase, $CategoriesTable> {
class $$CategoriesTableFilterComposer
extends FilterComposer<_$ExerciseDatabase, $CategoriesTable> {
$$CategoriesTableFilterComposer(super.$state);
ColumnFilters<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<ExerciseCategory, ExerciseCategory, String> get data =>
$state.composableBuilder(
ColumnWithTypeConverterFilters<ExerciseCategory, ExerciseCategory, String>
get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) =>
ColumnWithTypeConverterFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) => ColumnWithTypeConverterFilters(
column,
joinBuilders: joinBuilders));
}
class $$CategoriesTableOrderingComposer
@@ -1332,11 +1423,13 @@ class $$CategoriesTableOrderingComposer
$$CategoriesTableOrderingComposer(super.$state);
ColumnOrderings<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
}
typedef $$LanguagesTableInsertCompanionBuilder = LanguagesCompanion Function({
@@ -1363,9 +1456,12 @@ class $$LanguagesTableTableManager extends RootTableManager<
: super(TableManagerState(
db: db,
table: table,
filteringComposer: $$LanguagesTableFilterComposer(ComposerState(db, table)),
orderingComposer: $$LanguagesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) => $$LanguagesTableProcessedTableManager(p),
filteringComposer:
$$LanguagesTableFilterComposer(ComposerState(db, table)),
orderingComposer:
$$LanguagesTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) =>
$$LanguagesTableProcessedTableManager(p),
getUpdateCompanionBuilder: ({
Value<int> id = const Value.absent(),
Value<Language> data = const Value.absent(),
@@ -1401,16 +1497,20 @@ class $$LanguagesTableProcessedTableManager extends ProcessedTableManager<
$$LanguagesTableProcessedTableManager(super.$state);
}
class $$LanguagesTableFilterComposer extends FilterComposer<_$ExerciseDatabase, $LanguagesTable> {
class $$LanguagesTableFilterComposer
extends FilterComposer<_$ExerciseDatabase, $LanguagesTable> {
$$LanguagesTableFilterComposer(super.$state);
ColumnFilters<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<Language, Language, String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) =>
ColumnWithTypeConverterFilters(column, joinBuilders: joinBuilders));
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnWithTypeConverterFilters<Language, Language, String> get data =>
$state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnWithTypeConverterFilters(
column,
joinBuilders: joinBuilders));
}
class $$LanguagesTableOrderingComposer
@@ -1418,21 +1518,26 @@ class $$LanguagesTableOrderingComposer
$$LanguagesTableOrderingComposer(super.$state);
ColumnOrderings<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
}
class _$ExerciseDatabaseManager {
final _$ExerciseDatabase _db;
_$ExerciseDatabaseManager(this._db);
$$ExercisesTableTableManager get exercises => $$ExercisesTableTableManager(_db, _db.exercises);
$$MusclesTableTableManager get muscles => $$MusclesTableTableManager(_db, _db.muscles);
$$ExercisesTableTableManager get exercises =>
$$ExercisesTableTableManager(_db, _db.exercises);
$$MusclesTableTableManager get muscles =>
$$MusclesTableTableManager(_db, _db.muscles);
$$EquipmentsTableTableManager get equipments =>
$$EquipmentsTableTableManager(_db, _db.equipments);
$$CategoriesTableTableManager get categories =>
$$CategoriesTableTableManager(_db, _db.categories);
$$LanguagesTableTableManager get languages => $$LanguagesTableTableManager(_db, _db.languages);
$$LanguagesTableTableManager get languages =>
$$LanguagesTableTableManager(_db, _db.languages);
}

View File

@@ -3,20 +3,24 @@
part of 'ingredients_database.dart';
// ignore_for_file: type=lint
class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, IngredientTable> {
class $IngredientsTable extends Ingredients
with TableInfo<$IngredientsTable, IngredientTable> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$IngredientsTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<int> id = GeneratedColumn<int>('id', aliasedName, false,
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dataMeta = const VerificationMeta('data');
@override
late final GeneratedColumn<String> data = GeneratedColumn<String>('data', aliasedName, false,
late final GeneratedColumn<String> data = GeneratedColumn<String>(
'data', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _lastUpdateMeta = const VerificationMeta('lastUpdate');
static const VerificationMeta _lastUpdateMeta =
const VerificationMeta('lastUpdate');
@override
late final GeneratedColumn<DateTime> lastUpdate = GeneratedColumn<DateTime>(
'last_update', aliasedName, false,
@@ -39,13 +43,16 @@ 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_update')) {
context.handle(
_lastUpdateMeta, lastUpdate.isAcceptableOrUnknown(data['last_update']!, _lastUpdateMeta));
_lastUpdateMeta,
lastUpdate.isAcceptableOrUnknown(
data['last_update']!, _lastUpdateMeta));
} else if (isInserting) {
context.missing(_lastUpdateMeta);
}
@@ -58,8 +65,10 @@ class $IngredientsTable extends Ingredients with TableInfo<$IngredientsTable, In
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'])!,
lastUpdate: attachedDatabase.typeMapping
.read(DriftSqlType.dateTime, data['${effectivePrefix}last_update'])!,
);
@@ -75,7 +84,8 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
final int id;
final String data;
final DateTime lastUpdate;
const IngredientTable({required this.id, required this.data, required this.lastUpdate});
const IngredientTable(
{required this.id, required this.data, required this.lastUpdate});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
@@ -93,7 +103,8 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
);
}
factory IngredientTable.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) {
factory IngredientTable.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return IngredientTable(
id: serializer.fromJson<int>(json['id']),
@@ -111,7 +122,8 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
};
}
IngredientTable copyWith({int? id, String? data, DateTime? lastUpdate}) => IngredientTable(
IngredientTable copyWith({int? id, String? data, DateTime? lastUpdate}) =>
IngredientTable(
id: id ?? this.id,
data: data ?? this.data,
lastUpdate: lastUpdate ?? this.lastUpdate,
@@ -171,7 +183,10 @@ class IngredientsCompanion extends UpdateCompanion<IngredientTable> {
}
IngredientsCompanion copyWith(
{Value<int>? id, Value<String>? data, Value<DateTime>? lastUpdate, Value<int>? rowid}) {
{Value<int>? id,
Value<String>? data,
Value<DateTime>? lastUpdate,
Value<int>? rowid}) {
return IngredientsCompanion(
id: id ?? this.id,
data: data ?? this.data,
@@ -221,13 +236,15 @@ abstract class _$IngredientDatabase extends GeneratedDatabase {
List<DatabaseSchemaEntity> get allSchemaEntities => [ingredients];
}
typedef $$IngredientsTableInsertCompanionBuilder = IngredientsCompanion Function({
typedef $$IngredientsTableInsertCompanionBuilder = IngredientsCompanion
Function({
required int id,
required String data,
required DateTime lastUpdate,
Value<int> rowid,
});
typedef $$IngredientsTableUpdateCompanionBuilder = IngredientsCompanion Function({
typedef $$IngredientsTableUpdateCompanionBuilder = IngredientsCompanion
Function({
Value<int> id,
Value<String> data,
Value<DateTime> lastUpdate,
@@ -243,13 +260,17 @@ class $$IngredientsTableTableManager extends RootTableManager<
$$IngredientsTableProcessedTableManager,
$$IngredientsTableInsertCompanionBuilder,
$$IngredientsTableUpdateCompanionBuilder> {
$$IngredientsTableTableManager(_$IngredientDatabase db, $IngredientsTable table)
$$IngredientsTableTableManager(
_$IngredientDatabase db, $IngredientsTable table)
: super(TableManagerState(
db: db,
table: table,
filteringComposer: $$IngredientsTableFilterComposer(ComposerState(db, table)),
orderingComposer: $$IngredientsTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) => $$IngredientsTableProcessedTableManager(p),
filteringComposer:
$$IngredientsTableFilterComposer(ComposerState(db, table)),
orderingComposer:
$$IngredientsTableOrderingComposer(ComposerState(db, table)),
getChildManagerBuilder: (p) =>
$$IngredientsTableProcessedTableManager(p),
getUpdateCompanionBuilder: ({
Value<int> id = const Value.absent(),
Value<String> data = const Value.absent(),
@@ -294,15 +315,18 @@ class $$IngredientsTableFilterComposer
$$IngredientsTableFilterComposer(super.$state);
ColumnFilters<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnFilters<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
ColumnFilters<DateTime> get lastUpdate => $state.composableBuilder(
column: $state.table.lastUpdate,
builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnFilters(column, joinBuilders: joinBuilders));
}
class $$IngredientsTableOrderingComposer
@@ -310,15 +334,18 @@ class $$IngredientsTableOrderingComposer
$$IngredientsTableOrderingComposer(super.$state);
ColumnOrderings<int> get id => $state.composableBuilder(
column: $state.table.id,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<String> get data => $state.composableBuilder(
column: $state.table.data,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
ColumnOrderings<DateTime> get lastUpdate => $state.composableBuilder(
column: $state.table.lastUpdate,
builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders));
builder: (column, joinBuilders) =>
ColumnOrderings(column, joinBuilders: joinBuilders));
}
class _$IngredientDatabaseManager {

View File

@@ -396,7 +396,7 @@
"@register": {
"description": "Text for registration button"
},
"fibres": "الألياف",
"fiber": "الألياف",
"@fibres": {},
"aboutDescription": "شكرًا لاستخدامك وقر! وقر مشروع تعاوني مفتوح المصدر، تم إنشاؤه بواسطة عشّاق اللياقة البدنية من جميع أنحاء العالم.",
"@aboutDescription": {

View File

@@ -472,7 +472,7 @@
"@noWeightEntries": {
"description": "Message shown when the user has no logged weight entries"
},
"fibres": "Fibra",
"fiber": "Fibra",
"@fibres": {},
"sodium": "Sodi",
"@sodium": {},

View File

@@ -203,7 +203,7 @@
},
"saturatedFat": "Nasycené tuky",
"@saturatedFat": {},
"fibres": "Vláknina",
"fiber": "Vláknina",
"@fibres": {},
"sodium": "Sodík",
"@sodium": {},

View File

@@ -60,7 +60,7 @@
},
"sodium": "Natrium",
"@sodium": {},
"fibres": "Ballaststoff",
"fiber": "Ballaststoff",
"@fibres": {},
"saturatedFat": "Gesättigte Fettsäuren",
"@saturatedFat": {},

View File

@@ -429,7 +429,7 @@
},
"saturatedFat": "Saturated fat",
"@saturatedFat": {},
"fibres": "Fibers",
"fiber": "Fibers",
"@fibres": {},
"sodium": "Sodium",
"@sodium": {},

View File

@@ -130,7 +130,7 @@
},
"sodium": "Sodio",
"@sodium": {},
"fibres": "Fibra",
"fiber": "Fibra",
"@fibres": {},
"saturatedFat": "Grasas saturadas",
"@saturatedFat": {},

View File

@@ -69,7 +69,7 @@
},
"sodium": "Sodium",
"@sodium": {},
"fibres": "Fibres",
"fiber": "fiber",
"@fibres": {},
"saturatedFat": "Graisses saturées",
"@saturatedFat": {},

View File

@@ -275,7 +275,7 @@
"@fat": {},
"saturatedFat": "שומן רווי",
"@saturatedFat": {},
"fibres": "סיבים",
"fiber": "סיבים",
"@fibres": {},
"sodium": "נתרן",
"@sodium": {},

View File

@@ -127,7 +127,7 @@
"fat": "चर्बी",
"fatShort": "F",
"saturatedFat": "संतृप्त चर्बी",
"fibres": "रेशा",
"fiber": "रेशा",
"sodium": "सोड़ियम",
"amount": "मात्रा",
"unit": "इकाई",
@@ -166,8 +166,8 @@
"gallery": "ग्यालरी",
"addImage": "चित्र जोड़ें",
"dataCopied": "डेटा की प्रतिलिपि बना दिया गया है",
"appUpdateTitle" : "एप्लिकेशन अपडेट की जरूरत है",
"appUpdateContent" : "ऐप का यह संस्करण सर्वर के अनुकूल नहीं है, कृपया अपना एप्लिकेशन अपडेट करें।",
"appUpdateTitle": "एप्लिकेशन अपडेट की जरूरत है",
"appUpdateContent": "ऐप का यह संस्करण सर्वर के अनुकूल नहीं है, कृपया अपना एप्लिकेशन अपडेट करें।",
"productFound": "उत्पाद मिला",
"productFoundDescription": "बारकोड इस उत्पाद से मेल खाता है: {productName}। क्या आप जारी रखना चाहते हैं?",
"productNotFound": "उत्पाद नहीं मिला",

View File

@@ -193,7 +193,7 @@
},
"saturatedFat": "Zasićene masti",
"@saturatedFat": {},
"fibres": "Vlakna",
"fiber": "Vlakna",
"@fibres": {},
"sodium": "Natrij",
"@sodium": {},

View File

@@ -370,7 +370,7 @@
},
"saturatedFat": "Saturated fat",
"@saturatedFat": {},
"fibres": "Fibre",
"fiber": "Fibre",
"@fibres": {},
"sodium": "Sodium",
"@sodium": {},

View File

@@ -63,7 +63,7 @@
},
"sodium": "Sodio",
"@sodium": {},
"fibres": "Fibre",
"fiber": "Fibre",
"@fibres": {},
"saturatedFat": "Grassi saturi",
"@saturatedFat": {},

View File

@@ -369,7 +369,7 @@
},
"saturatedFat": "Saturated fat",
"@saturatedFat": {},
"fibres": "Fibre",
"fiber": "Fibre",
"@fibres": {},
"sodium": "Sodium",
"@sodium": {},

View File

@@ -3,7 +3,7 @@
"@aboutText": {
"description": "Text in the about dialog"
},
"fibres": "Fiber",
"fiber": "Fiber",
"@fibres": {},
"mealLogged": "Måltid lagt til i dagbok",
"@mealLogged": {},

View File

@@ -414,7 +414,7 @@
},
"saturatedFat": "Tłuszcz nasycony",
"@saturatedFat": {},
"fibres": "Błonnik",
"fiber": "Błonnik",
"@fibres": {},
"sodium": "Sód",
"@sodium": {},

View File

@@ -179,7 +179,7 @@
"@carbohydratesShort": {
"description": "The first letter or short name of the word 'Carbohydrates', used in overviews"
},
"fibres": "Fibra",
"fiber": "Fibra",
"@fibres": {},
"sodium": "Sódio",
"@sodium": {},

View File

@@ -271,7 +271,7 @@
},
"difference": "Diferença",
"@difference": {},
"fibres": "Fibra",
"fiber": "Fibra",
"@fibres": {},
"aboutDescription": "Obrigado por usar o Wger! Wger é um projeto colaborativo de código aberto, feito por entusiastas do fitness de todo o mundo.",
"@aboutDescription": {

View File

@@ -399,7 +399,7 @@
"@total": {
"description": "Label used for total sums of e.g. calories or similar"
},
"fibres": "Клетчатка",
"fiber": "Клетчатка",
"@fibres": {},
"percentEnergy": "Процент энергии",
"@percentEnergy": {},

View File

@@ -357,7 +357,7 @@
},
"saturatedFat": "Doymuş yağ",
"@saturatedFat": {},
"fibres": "Lif",
"fiber": "Lif",
"@fibres": {},
"delete": "Sil",
"@delete": {},

View File

@@ -401,7 +401,7 @@
},
"saturatedFat": "Насичені жири",
"@saturatedFat": {},
"fibres": "Волокна",
"fiber": "Волокна",
"@fibres": {},
"sodium": "Натрій",
"@sodium": {},

View File

@@ -274,7 +274,7 @@
},
"sodium": "钠",
"@sodium": {},
"fibres": "纤维",
"fiber": "纤维",
"@fibres": {},
"saturatedFat": "饱和脂肪",
"@saturatedFat": {},

View File

@@ -18,7 +18,8 @@ WeightEntry _$WeightEntryFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) => <String, dynamic>{
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) =>
<String, dynamic>{
'id': instance.id,
'weight': numToString(instance.weight),
'date': toDate(instance.date),

View File

@@ -17,7 +17,8 @@ ExerciseCategory _$ExerciseCategoryFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) => <String, dynamic>{
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
};

View File

@@ -25,8 +25,12 @@ Exercise _$ExerciseFromJson(Map<String, dynamic> json) {
return Exercise(
id: (json['id'] as num?)?.toInt(),
uuid: json['uuid'] as String?,
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
lastUpdate: json['last_update'] == null ? null : DateTime.parse(json['last_update'] as String),
created: json['created'] == null
? null
: DateTime.parse(json['created'] as String),
lastUpdate: json['last_update'] == null
? null
: DateTime.parse(json['last_update'] as String),
lastUpdateGlobal: json['last_update_global'] == null
? null
: DateTime.parse(json['last_update_global'] as String),
@@ -39,10 +43,15 @@ Exercise _$ExerciseFromJson(Map<String, dynamic> json) {
: ExerciseCategory.fromJson(json['categories'] as Map<String, dynamic>),
)
..categoryId = (json['category'] as num).toInt()
..musclesIds = (json['muscles'] as List<dynamic>).map((e) => (e as num).toInt()).toList()
..musclesSecondaryIds =
(json['muscles_secondary'] as List<dynamic>).map((e) => (e as num).toInt()).toList()
..equipmentIds = (json['equipment'] as List<dynamic>).map((e) => (e as num).toInt()).toList();
..musclesIds = (json['muscles'] as List<dynamic>)
.map((e) => (e as num).toInt())
.toList()
..musclesSecondaryIds = (json['muscles_secondary'] as List<dynamic>)
.map((e) => (e as num).toInt())
.toList()
..equipmentIds = (json['equipment'] as List<dynamic>)
.map((e) => (e as num).toInt())
.toList();
}
Map<String, dynamic> _$ExerciseToJson(Exercise instance) => <String, dynamic>{
@@ -56,6 +65,7 @@ Map<String, dynamic> _$ExerciseToJson(Exercise instance) => <String, dynamic>{
'categories': instance.category?.toJson(),
'muscles': instance.musclesIds,
'muscles_secondary': instance.musclesSecondaryIds,
'musclesSecondary': instance.musclesSecondary.map((e) => e.toJson()).toList(),
'musclesSecondary':
instance.musclesSecondary.map((e) => e.toJson()).toList(),
'equipment': instance.equipmentIds,
};

View File

@@ -21,11 +21,14 @@ ExerciseApiData _$ExerciseApiDataFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$ExerciseApiData {
int get id => throw _privateConstructorUsedError;
String get uuid => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
String get uuid =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'variations')
int? get variationId => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
int? get variationId =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'created')
DateTime get created => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
DateTime get created =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'last_update')
DateTime get lastUpdate =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@@ -42,7 +45,8 @@ mixin _$ExerciseApiData {
@JsonKey(name: 'exercises')
List<Translation> get translations => throw _privateConstructorUsedError;
List<ExerciseImage> get images => throw _privateConstructorUsedError;
List<Video> get videos => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
List<Video> get videos =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'author_history')
List<String> get authors =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@@ -51,12 +55,14 @@ mixin _$ExerciseApiData {
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$ExerciseApiDataCopyWith<ExerciseApiData> get copyWith => throw _privateConstructorUsedError;
$ExerciseApiDataCopyWith<ExerciseApiData> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ExerciseApiDataCopyWith<$Res> {
factory $ExerciseApiDataCopyWith(ExerciseApiData value, $Res Function(ExerciseApiData) then) =
factory $ExerciseApiDataCopyWith(
ExerciseApiData value, $Res Function(ExerciseApiData) then) =
_$ExerciseApiDataCopyWithImpl<$Res, ExerciseApiData>;
@useResult
$Res call(
@@ -172,9 +178,10 @@ class _$ExerciseApiDataCopyWithImpl<$Res, $Val extends ExerciseApiData>
}
/// @nodoc
abstract class _$$ExerciseBaseDataImplCopyWith<$Res> implements $ExerciseApiDataCopyWith<$Res> {
factory _$$ExerciseBaseDataImplCopyWith(
_$ExerciseBaseDataImpl value, $Res Function(_$ExerciseBaseDataImpl) then) =
abstract class _$$ExerciseBaseDataImplCopyWith<$Res>
implements $ExerciseApiDataCopyWith<$Res> {
factory _$$ExerciseBaseDataImplCopyWith(_$ExerciseBaseDataImpl value,
$Res Function(_$ExerciseBaseDataImpl) then) =
__$$ExerciseBaseDataImplCopyWithImpl<$Res>;
@override
@useResult
@@ -200,8 +207,8 @@ abstract class _$$ExerciseBaseDataImplCopyWith<$Res> implements $ExerciseApiData
class __$$ExerciseBaseDataImplCopyWithImpl<$Res>
extends _$ExerciseApiDataCopyWithImpl<$Res, _$ExerciseBaseDataImpl>
implements _$$ExerciseBaseDataImplCopyWith<$Res> {
__$$ExerciseBaseDataImplCopyWithImpl(
_$ExerciseBaseDataImpl _value, $Res Function(_$ExerciseBaseDataImpl) _then)
__$$ExerciseBaseDataImplCopyWithImpl(_$ExerciseBaseDataImpl _value,
$Res Function(_$ExerciseBaseDataImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -300,13 +307,15 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
@JsonKey(name: 'last_update_global') required this.lastUpdateGlobal,
required this.category,
required final List<Muscle> muscles,
@JsonKey(name: 'muscles_secondary') required final List<Muscle> musclesSecondary,
@JsonKey(name: 'muscles_secondary')
required final List<Muscle> musclesSecondary,
required final List<Equipment> equipment,
@JsonKey(name: 'exercises') required final List<Translation> translations,
required final List<ExerciseImage> images,
required final List<Video> videos,
@JsonKey(name: 'author_history') required final List<String> authors,
@JsonKey(name: 'total_authors_history') required final List<String> authorsGlobal})
@JsonKey(name: 'total_authors_history')
required final List<String> authorsGlobal})
: _muscles = muscles,
_musclesSecondary = musclesSecondary,
_equipment = equipment,
@@ -355,7 +364,8 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
@override
@JsonKey(name: 'muscles_secondary')
List<Muscle> get musclesSecondary {
if (_musclesSecondary is EqualUnmodifiableListView) return _musclesSecondary;
if (_musclesSecondary is EqualUnmodifiableListView)
return _musclesSecondary;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_musclesSecondary);
}
@@ -431,20 +441,27 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
other is _$ExerciseBaseDataImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.uuid, uuid) || other.uuid == uuid) &&
(identical(other.variationId, variationId) || other.variationId == variationId) &&
(identical(other.variationId, variationId) ||
other.variationId == variationId) &&
(identical(other.created, created) || other.created == created) &&
(identical(other.lastUpdate, lastUpdate) || other.lastUpdate == lastUpdate) &&
(identical(other.lastUpdate, lastUpdate) ||
other.lastUpdate == lastUpdate) &&
(identical(other.lastUpdateGlobal, lastUpdateGlobal) ||
other.lastUpdateGlobal == lastUpdateGlobal) &&
(identical(other.category, category) || other.category == category) &&
(identical(other.category, category) ||
other.category == category) &&
const DeepCollectionEquality().equals(other._muscles, _muscles) &&
const DeepCollectionEquality().equals(other._musclesSecondary, _musclesSecondary) &&
const DeepCollectionEquality().equals(other._equipment, _equipment) &&
const DeepCollectionEquality().equals(other._translations, _translations) &&
const DeepCollectionEquality()
.equals(other._musclesSecondary, _musclesSecondary) &&
const DeepCollectionEquality()
.equals(other._equipment, _equipment) &&
const DeepCollectionEquality()
.equals(other._translations, _translations) &&
const DeepCollectionEquality().equals(other._images, _images) &&
const DeepCollectionEquality().equals(other._videos, _videos) &&
const DeepCollectionEquality().equals(other._authors, _authors) &&
const DeepCollectionEquality().equals(other._authorsGlobal, _authorsGlobal));
const DeepCollectionEquality()
.equals(other._authorsGlobal, _authorsGlobal));
}
@JsonKey(ignore: true)
@@ -471,7 +488,8 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
@override
@pragma('vm:prefer-inline')
_$$ExerciseBaseDataImplCopyWith<_$ExerciseBaseDataImpl> get copyWith =>
__$$ExerciseBaseDataImplCopyWithImpl<_$ExerciseBaseDataImpl>(this, _$identity);
__$$ExerciseBaseDataImplCopyWithImpl<_$ExerciseBaseDataImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -483,24 +501,27 @@ class _$ExerciseBaseDataImpl implements _ExerciseBaseData {
abstract class _ExerciseBaseData implements ExerciseApiData {
factory _ExerciseBaseData(
{required final int id,
required final String uuid,
@JsonKey(name: 'variations') final int? variationId,
@JsonKey(name: 'created') required final DateTime created,
@JsonKey(name: 'last_update') required final DateTime lastUpdate,
@JsonKey(name: 'last_update_global') required final DateTime lastUpdateGlobal,
required final ExerciseCategory category,
required final List<Muscle> muscles,
@JsonKey(name: 'muscles_secondary') required final List<Muscle> musclesSecondary,
required final List<Equipment> equipment,
@JsonKey(name: 'exercises') required final List<Translation> translations,
required final List<ExerciseImage> images,
required final List<Video> videos,
@JsonKey(name: 'author_history') required final List<String> authors,
@JsonKey(name: 'total_authors_history') required final List<String> authorsGlobal}) =
_$ExerciseBaseDataImpl;
{required final int id,
required final String uuid,
@JsonKey(name: 'variations') final int? variationId,
@JsonKey(name: 'created') required final DateTime created,
@JsonKey(name: 'last_update') required final DateTime lastUpdate,
@JsonKey(name: 'last_update_global')
required final DateTime lastUpdateGlobal,
required final ExerciseCategory category,
required final List<Muscle> muscles,
@JsonKey(name: 'muscles_secondary')
required final List<Muscle> musclesSecondary,
required final List<Equipment> equipment,
@JsonKey(name: 'exercises') required final List<Translation> translations,
required final List<ExerciseImage> images,
required final List<Video> videos,
@JsonKey(name: 'author_history') required final List<String> authors,
@JsonKey(name: 'total_authors_history')
required final List<String> authorsGlobal}) = _$ExerciseBaseDataImpl;
factory _ExerciseBaseData.fromJson(Map<String, dynamic> json) = _$ExerciseBaseDataImpl.fromJson;
factory _ExerciseBaseData.fromJson(Map<String, dynamic> json) =
_$ExerciseBaseDataImpl.fromJson;
@override
int get id;
@@ -546,7 +567,8 @@ abstract class _ExerciseBaseData implements ExerciseApiData {
throw _privateConstructorUsedError;
}
ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(Map<String, dynamic> json) {
ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(
Map<String, dynamic> json) {
return _ExerciseSearchDetails.fromJson(json);
}
@@ -554,12 +576,14 @@ ExerciseSearchDetails _$ExerciseSearchDetailsFromJson(Map<String, dynamic> json)
mixin _$ExerciseSearchDetails {
// ignore: invalid_annotation_target
@JsonKey(name: 'id')
int get translationId => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
int get translationId =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'base_id')
int get exerciseId => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get category => throw _privateConstructorUsedError;
String? get image => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
String? get image =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'image_thumbnail')
String? get imageThumbnail => throw _privateConstructorUsedError;
@@ -571,8 +595,8 @@ mixin _$ExerciseSearchDetails {
/// @nodoc
abstract class $ExerciseSearchDetailsCopyWith<$Res> {
factory $ExerciseSearchDetailsCopyWith(
ExerciseSearchDetails value, $Res Function(ExerciseSearchDetails) then) =
factory $ExerciseSearchDetailsCopyWith(ExerciseSearchDetails value,
$Res Function(ExerciseSearchDetails) then) =
_$ExerciseSearchDetailsCopyWithImpl<$Res, ExerciseSearchDetails>;
@useResult
$Res call(
@@ -585,7 +609,8 @@ abstract class $ExerciseSearchDetailsCopyWith<$Res> {
}
/// @nodoc
class _$ExerciseSearchDetailsCopyWithImpl<$Res, $Val extends ExerciseSearchDetails>
class _$ExerciseSearchDetailsCopyWithImpl<$Res,
$Val extends ExerciseSearchDetails>
implements $ExerciseSearchDetailsCopyWith<$Res> {
_$ExerciseSearchDetailsCopyWithImpl(this._value, this._then);
@@ -637,7 +662,8 @@ class _$ExerciseSearchDetailsCopyWithImpl<$Res, $Val extends ExerciseSearchDetai
abstract class _$$ExerciseSearchDetailsImplCopyWith<$Res>
implements $ExerciseSearchDetailsCopyWith<$Res> {
factory _$$ExerciseSearchDetailsImplCopyWith(
_$ExerciseSearchDetailsImpl value, $Res Function(_$ExerciseSearchDetailsImpl) then) =
_$ExerciseSearchDetailsImpl value,
$Res Function(_$ExerciseSearchDetailsImpl) then) =
__$$ExerciseSearchDetailsImplCopyWithImpl<$Res>;
@override
@useResult
@@ -652,10 +678,11 @@ abstract class _$$ExerciseSearchDetailsImplCopyWith<$Res>
/// @nodoc
class __$$ExerciseSearchDetailsImplCopyWithImpl<$Res>
extends _$ExerciseSearchDetailsCopyWithImpl<$Res, _$ExerciseSearchDetailsImpl>
extends _$ExerciseSearchDetailsCopyWithImpl<$Res,
_$ExerciseSearchDetailsImpl>
implements _$$ExerciseSearchDetailsImplCopyWith<$Res> {
__$$ExerciseSearchDetailsImplCopyWithImpl(
_$ExerciseSearchDetailsImpl _value, $Res Function(_$ExerciseSearchDetailsImpl) _then)
__$$ExerciseSearchDetailsImplCopyWithImpl(_$ExerciseSearchDetailsImpl _value,
$Res Function(_$ExerciseSearchDetailsImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -742,9 +769,11 @@ class _$ExerciseSearchDetailsImpl implements _ExerciseSearchDetails {
other is _$ExerciseSearchDetailsImpl &&
(identical(other.translationId, translationId) ||
other.translationId == translationId) &&
(identical(other.exerciseId, exerciseId) || other.exerciseId == exerciseId) &&
(identical(other.exerciseId, exerciseId) ||
other.exerciseId == exerciseId) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.category, category) || other.category == category) &&
(identical(other.category, category) ||
other.category == category) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.imageThumbnail, imageThumbnail) ||
other.imageThumbnail == imageThumbnail));
@@ -752,14 +781,15 @@ class _$ExerciseSearchDetailsImpl implements _ExerciseSearchDetails {
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, translationId, exerciseId, name, category, image, imageThumbnail);
int get hashCode => Object.hash(runtimeType, translationId, exerciseId, name,
category, image, imageThumbnail);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ExerciseSearchDetailsImplCopyWith<_$ExerciseSearchDetailsImpl> get copyWith =>
__$$ExerciseSearchDetailsImplCopyWithImpl<_$ExerciseSearchDetailsImpl>(this, _$identity);
_$$ExerciseSearchDetailsImplCopyWith<_$ExerciseSearchDetailsImpl>
get copyWith => __$$ExerciseSearchDetailsImplCopyWithImpl<
_$ExerciseSearchDetailsImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -771,13 +801,13 @@ class _$ExerciseSearchDetailsImpl implements _ExerciseSearchDetails {
abstract class _ExerciseSearchDetails implements ExerciseSearchDetails {
factory _ExerciseSearchDetails(
{@JsonKey(name: 'id') required final int translationId,
@JsonKey(name: 'base_id') required final int exerciseId,
required final String name,
required final String category,
required final String? image,
@JsonKey(name: 'image_thumbnail') required final String? imageThumbnail}) =
_$ExerciseSearchDetailsImpl;
{@JsonKey(name: 'id') required final int translationId,
@JsonKey(name: 'base_id') required final int exerciseId,
required final String name,
required final String category,
required final String? image,
@JsonKey(name: 'image_thumbnail')
required final String? imageThumbnail}) = _$ExerciseSearchDetailsImpl;
factory _ExerciseSearchDetails.fromJson(Map<String, dynamic> json) =
_$ExerciseSearchDetailsImpl.fromJson;
@@ -799,8 +829,8 @@ abstract class _ExerciseSearchDetails implements ExerciseSearchDetails {
String? get imageThumbnail;
@override
@JsonKey(ignore: true)
_$$ExerciseSearchDetailsImplCopyWith<_$ExerciseSearchDetailsImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ExerciseSearchDetailsImplCopyWith<_$ExerciseSearchDetailsImpl>
get copyWith => throw _privateConstructorUsedError;
}
ExerciseSearchEntry _$ExerciseSearchEntryFromJson(Map<String, dynamic> json) {
@@ -869,8 +899,8 @@ class _$ExerciseSearchEntryCopyWithImpl<$Res, $Val extends ExerciseSearchEntry>
/// @nodoc
abstract class _$$ExerciseSearchEntryImplCopyWith<$Res>
implements $ExerciseSearchEntryCopyWith<$Res> {
factory _$$ExerciseSearchEntryImplCopyWith(
_$ExerciseSearchEntryImpl value, $Res Function(_$ExerciseSearchEntryImpl) then) =
factory _$$ExerciseSearchEntryImplCopyWith(_$ExerciseSearchEntryImpl value,
$Res Function(_$ExerciseSearchEntryImpl) then) =
__$$ExerciseSearchEntryImplCopyWithImpl<$Res>;
@override
@useResult
@@ -884,8 +914,8 @@ abstract class _$$ExerciseSearchEntryImplCopyWith<$Res>
class __$$ExerciseSearchEntryImplCopyWithImpl<$Res>
extends _$ExerciseSearchEntryCopyWithImpl<$Res, _$ExerciseSearchEntryImpl>
implements _$$ExerciseSearchEntryImplCopyWith<$Res> {
__$$ExerciseSearchEntryImplCopyWithImpl(
_$ExerciseSearchEntryImpl _value, $Res Function(_$ExerciseSearchEntryImpl) _then)
__$$ExerciseSearchEntryImplCopyWithImpl(_$ExerciseSearchEntryImpl _value,
$Res Function(_$ExerciseSearchEntryImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -942,7 +972,8 @@ class _$ExerciseSearchEntryImpl implements _ExerciseSearchEntry {
@override
@pragma('vm:prefer-inline')
_$$ExerciseSearchEntryImplCopyWith<_$ExerciseSearchEntryImpl> get copyWith =>
__$$ExerciseSearchEntryImplCopyWithImpl<_$ExerciseSearchEntryImpl>(this, _$identity);
__$$ExerciseSearchEntryImplCopyWithImpl<_$ExerciseSearchEntryImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -976,11 +1007,13 @@ ExerciseApiSearch _$ExerciseApiSearchFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$ExerciseApiSearch {
List<ExerciseSearchEntry> get suggestions => throw _privateConstructorUsedError;
List<ExerciseSearchEntry> get suggestions =>
throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$ExerciseApiSearchCopyWith<ExerciseApiSearch> get copyWith => throw _privateConstructorUsedError;
$ExerciseApiSearchCopyWith<ExerciseApiSearch> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
@@ -1017,9 +1050,10 @@ class _$ExerciseApiSearchCopyWithImpl<$Res, $Val extends ExerciseApiSearch>
}
/// @nodoc
abstract class _$$ExerciseApiSearchImplCopyWith<$Res> implements $ExerciseApiSearchCopyWith<$Res> {
factory _$$ExerciseApiSearchImplCopyWith(
_$ExerciseApiSearchImpl value, $Res Function(_$ExerciseApiSearchImpl) then) =
abstract class _$$ExerciseApiSearchImplCopyWith<$Res>
implements $ExerciseApiSearchCopyWith<$Res> {
factory _$$ExerciseApiSearchImplCopyWith(_$ExerciseApiSearchImpl value,
$Res Function(_$ExerciseApiSearchImpl) then) =
__$$ExerciseApiSearchImplCopyWithImpl<$Res>;
@override
@useResult
@@ -1030,8 +1064,8 @@ abstract class _$$ExerciseApiSearchImplCopyWith<$Res> implements $ExerciseApiSea
class __$$ExerciseApiSearchImplCopyWithImpl<$Res>
extends _$ExerciseApiSearchCopyWithImpl<$Res, _$ExerciseApiSearchImpl>
implements _$$ExerciseApiSearchImplCopyWith<$Res> {
__$$ExerciseApiSearchImplCopyWithImpl(
_$ExerciseApiSearchImpl _value, $Res Function(_$ExerciseApiSearchImpl) _then)
__$$ExerciseApiSearchImplCopyWithImpl(_$ExerciseApiSearchImpl _value,
$Res Function(_$ExerciseApiSearchImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -1051,7 +1085,8 @@ class __$$ExerciseApiSearchImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$ExerciseApiSearchImpl implements _ExerciseApiSearch {
_$ExerciseApiSearchImpl({required final List<ExerciseSearchEntry> suggestions})
_$ExerciseApiSearchImpl(
{required final List<ExerciseSearchEntry> suggestions})
: _suggestions = suggestions;
factory _$ExerciseApiSearchImpl.fromJson(Map<String, dynamic> json) =>
@@ -1075,18 +1110,21 @@ class _$ExerciseApiSearchImpl implements _ExerciseApiSearch {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ExerciseApiSearchImpl &&
const DeepCollectionEquality().equals(other._suggestions, _suggestions));
const DeepCollectionEquality()
.equals(other._suggestions, _suggestions));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_suggestions));
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_suggestions));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ExerciseApiSearchImplCopyWith<_$ExerciseApiSearchImpl> get copyWith =>
__$$ExerciseApiSearchImplCopyWithImpl<_$ExerciseApiSearchImpl>(this, _$identity);
__$$ExerciseApiSearchImplCopyWithImpl<_$ExerciseApiSearchImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1097,10 +1135,12 @@ class _$ExerciseApiSearchImpl implements _ExerciseApiSearch {
}
abstract class _ExerciseApiSearch implements ExerciseApiSearch {
factory _ExerciseApiSearch({required final List<ExerciseSearchEntry> suggestions}) =
factory _ExerciseApiSearch(
{required final List<ExerciseSearchEntry> suggestions}) =
_$ExerciseApiSearchImpl;
factory _ExerciseApiSearch.fromJson(Map<String, dynamic> json) = _$ExerciseApiSearchImpl.fromJson;
factory _ExerciseApiSearch.fromJson(Map<String, dynamic> json) =
_$ExerciseApiSearchImpl.fromJson;
@override
List<ExerciseSearchEntry> get suggestions;

View File

@@ -6,7 +6,8 @@ part of 'exercise_api.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ExerciseBaseDataImpl _$$ExerciseBaseDataImplFromJson(Map<String, dynamic> json) =>
_$ExerciseBaseDataImpl _$$ExerciseBaseDataImplFromJson(
Map<String, dynamic> json) =>
_$ExerciseBaseDataImpl(
id: (json['id'] as num).toInt(),
uuid: json['uuid'] as String,
@@ -14,7 +15,8 @@ _$ExerciseBaseDataImpl _$$ExerciseBaseDataImplFromJson(Map<String, dynamic> json
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(),
@@ -33,12 +35,16 @@ _$ExerciseBaseDataImpl _$$ExerciseBaseDataImplFromJson(Map<String, dynamic> json
videos: (json['videos'] as List<dynamic>)
.map((e) => Video.fromJson(e as Map<String, dynamic>))
.toList(),
authors: (json['author_history'] as List<dynamic>).map((e) => e as String).toList(),
authorsGlobal:
(json['total_authors_history'] as List<dynamic>).map((e) => e as String).toList(),
authors: (json['author_history'] as List<dynamic>)
.map((e) => e as String)
.toList(),
authorsGlobal: (json['total_authors_history'] as List<dynamic>)
.map((e) => e as String)
.toList(),
);
Map<String, dynamic> _$$ExerciseBaseDataImplToJson(_$ExerciseBaseDataImpl instance) =>
Map<String, dynamic> _$$ExerciseBaseDataImplToJson(
_$ExerciseBaseDataImpl instance) =>
<String, dynamic>{
'id': instance.id,
'uuid': instance.uuid,
@@ -57,7 +63,8 @@ Map<String, dynamic> _$$ExerciseBaseDataImplToJson(_$ExerciseBaseDataImpl instan
'total_authors_history': instance.authorsGlobal,
};
_$ExerciseSearchDetailsImpl _$$ExerciseSearchDetailsImplFromJson(Map<String, dynamic> json) =>
_$ExerciseSearchDetailsImpl _$$ExerciseSearchDetailsImplFromJson(
Map<String, dynamic> json) =>
_$ExerciseSearchDetailsImpl(
translationId: (json['id'] as num).toInt(),
exerciseId: (json['base_id'] as num).toInt(),
@@ -67,7 +74,8 @@ _$ExerciseSearchDetailsImpl _$$ExerciseSearchDetailsImplFromJson(Map<String, dyn
imageThumbnail: json['image_thumbnail'] as String?,
);
Map<String, dynamic> _$$ExerciseSearchDetailsImplToJson(_$ExerciseSearchDetailsImpl instance) =>
Map<String, dynamic> _$$ExerciseSearchDetailsImplToJson(
_$ExerciseSearchDetailsImpl instance) =>
<String, dynamic>{
'id': instance.translationId,
'base_id': instance.exerciseId,
@@ -77,26 +85,31 @@ Map<String, dynamic> _$$ExerciseSearchDetailsImplToJson(_$ExerciseSearchDetailsI
'image_thumbnail': instance.imageThumbnail,
};
_$ExerciseSearchEntryImpl _$$ExerciseSearchEntryImplFromJson(Map<String, dynamic> json) =>
_$ExerciseSearchEntryImpl _$$ExerciseSearchEntryImplFromJson(
Map<String, dynamic> json) =>
_$ExerciseSearchEntryImpl(
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> _$$ExerciseSearchEntryImplToJson(_$ExerciseSearchEntryImpl instance) =>
Map<String, dynamic> _$$ExerciseSearchEntryImplToJson(
_$ExerciseSearchEntryImpl instance) =>
<String, dynamic>{
'value': instance.value,
'data': instance.data,
};
_$ExerciseApiSearchImpl _$$ExerciseApiSearchImplFromJson(Map<String, dynamic> json) =>
_$ExerciseApiSearchImpl _$$ExerciseApiSearchImplFromJson(
Map<String, dynamic> json) =>
_$ExerciseApiSearchImpl(
suggestions: (json['suggestions'] as List<dynamic>)
.map((e) => ExerciseSearchEntry.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$ExerciseApiSearchImplToJson(_$ExerciseApiSearchImpl instance) =>
Map<String, dynamic> _$$ExerciseApiSearchImplToJson(
_$ExerciseApiSearchImpl instance) =>
<String, dynamic>{
'suggestions': instance.suggestions,
};

View File

@@ -20,7 +20,8 @@ ExerciseImage _$ExerciseImageFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) => <String, dynamic>{
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) =>
<String, dynamic>{
'id': instance.id,
'uuid': instance.uuid,
'exercise_base': instance.exerciseBaseId,

View File

@@ -14,7 +14,8 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(Map<String, dynamic> json) {
IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(
Map<String, dynamic> json) {
return _IngredientApiSearchDetails.fromJson(json);
}
@@ -22,21 +23,23 @@ IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(Map<String, dyna
mixin _$IngredientApiSearchDetails {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String? get image => throw _privateConstructorUsedError; // ignore: invalid_annotation_target
String? get image =>
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(name: 'image_thumbnail')
String? get imageThumbnail => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$IngredientApiSearchDetailsCopyWith<IngredientApiSearchDetails> get copyWith =>
throw _privateConstructorUsedError;
$IngredientApiSearchDetailsCopyWith<IngredientApiSearchDetails>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $IngredientApiSearchDetailsCopyWith<$Res> {
factory $IngredientApiSearchDetailsCopyWith(
IngredientApiSearchDetails value, $Res Function(IngredientApiSearchDetails) then) =
_$IngredientApiSearchDetailsCopyWithImpl<$Res, IngredientApiSearchDetails>;
factory $IngredientApiSearchDetailsCopyWith(IngredientApiSearchDetails value,
$Res Function(IngredientApiSearchDetails) then) =
_$IngredientApiSearchDetailsCopyWithImpl<$Res,
IngredientApiSearchDetails>;
@useResult
$Res call(
{int id,
@@ -46,7 +49,8 @@ abstract class $IngredientApiSearchDetailsCopyWith<$Res> {
}
/// @nodoc
class _$IngredientApiSearchDetailsCopyWithImpl<$Res, $Val extends IngredientApiSearchDetails>
class _$IngredientApiSearchDetailsCopyWithImpl<$Res,
$Val extends IngredientApiSearchDetails>
implements $IngredientApiSearchDetailsCopyWith<$Res> {
_$IngredientApiSearchDetailsCopyWithImpl(this._value, this._then);
@@ -87,7 +91,8 @@ class _$IngredientApiSearchDetailsCopyWithImpl<$Res, $Val extends IngredientApiS
/// @nodoc
abstract class _$$IngredientApiSearchDetailsImplCopyWith<$Res>
implements $IngredientApiSearchDetailsCopyWith<$Res> {
factory _$$IngredientApiSearchDetailsImplCopyWith(_$IngredientApiSearchDetailsImpl value,
factory _$$IngredientApiSearchDetailsImplCopyWith(
_$IngredientApiSearchDetailsImpl value,
$Res Function(_$IngredientApiSearchDetailsImpl) then) =
__$$IngredientApiSearchDetailsImplCopyWithImpl<$Res>;
@override
@@ -101,9 +106,11 @@ abstract class _$$IngredientApiSearchDetailsImplCopyWith<$Res>
/// @nodoc
class __$$IngredientApiSearchDetailsImplCopyWithImpl<$Res>
extends _$IngredientApiSearchDetailsCopyWithImpl<$Res, _$IngredientApiSearchDetailsImpl>
extends _$IngredientApiSearchDetailsCopyWithImpl<$Res,
_$IngredientApiSearchDetailsImpl>
implements _$$IngredientApiSearchDetailsImplCopyWith<$Res> {
__$$IngredientApiSearchDetailsImplCopyWithImpl(_$IngredientApiSearchDetailsImpl _value,
__$$IngredientApiSearchDetailsImplCopyWithImpl(
_$IngredientApiSearchDetailsImpl _value,
$Res Function(_$IngredientApiSearchDetailsImpl) _then)
: super(_value, _then);
@@ -145,7 +152,8 @@ class _$IngredientApiSearchDetailsImpl implements _IngredientApiSearchDetails {
required this.image,
@JsonKey(name: 'image_thumbnail') required this.imageThumbnail});
factory _$IngredientApiSearchDetailsImpl.fromJson(Map<String, dynamic> json) =>
factory _$IngredientApiSearchDetailsImpl.fromJson(
Map<String, dynamic> json) =>
_$$IngredientApiSearchDetailsImplFromJson(json);
@override
@@ -183,9 +191,9 @@ class _$IngredientApiSearchDetailsImpl implements _IngredientApiSearchDetails {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$IngredientApiSearchDetailsImplCopyWith<_$IngredientApiSearchDetailsImpl> get copyWith =>
__$$IngredientApiSearchDetailsImplCopyWithImpl<_$IngredientApiSearchDetailsImpl>(
this, _$identity);
_$$IngredientApiSearchDetailsImplCopyWith<_$IngredientApiSearchDetailsImpl>
get copyWith => __$$IngredientApiSearchDetailsImplCopyWithImpl<
_$IngredientApiSearchDetailsImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -195,12 +203,14 @@ class _$IngredientApiSearchDetailsImpl implements _IngredientApiSearchDetails {
}
}
abstract class _IngredientApiSearchDetails implements IngredientApiSearchDetails {
abstract class _IngredientApiSearchDetails
implements IngredientApiSearchDetails {
factory _IngredientApiSearchDetails(
{required final int id,
required final String name,
required final String? image,
@JsonKey(name: 'image_thumbnail') required final String? imageThumbnail}) =
@JsonKey(name: 'image_thumbnail')
required final String? imageThumbnail}) =
_$IngredientApiSearchDetailsImpl;
factory _IngredientApiSearchDetails.fromJson(Map<String, dynamic> json) =
@@ -217,11 +227,12 @@ abstract class _IngredientApiSearchDetails implements IngredientApiSearchDetails
String? get imageThumbnail;
@override
@JsonKey(ignore: true)
_$$IngredientApiSearchDetailsImplCopyWith<_$IngredientApiSearchDetailsImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$IngredientApiSearchDetailsImplCopyWith<_$IngredientApiSearchDetailsImpl>
get copyWith => throw _privateConstructorUsedError;
}
IngredientApiSearchEntry _$IngredientApiSearchEntryFromJson(Map<String, dynamic> json) {
IngredientApiSearchEntry _$IngredientApiSearchEntryFromJson(
Map<String, dynamic> json) {
return _IngredientApiSearchEntry.fromJson(json);
}
@@ -238,8 +249,8 @@ mixin _$IngredientApiSearchEntry {
/// @nodoc
abstract class $IngredientApiSearchEntryCopyWith<$Res> {
factory $IngredientApiSearchEntryCopyWith(
IngredientApiSearchEntry value, $Res Function(IngredientApiSearchEntry) then) =
factory $IngredientApiSearchEntryCopyWith(IngredientApiSearchEntry value,
$Res Function(IngredientApiSearchEntry) then) =
_$IngredientApiSearchEntryCopyWithImpl<$Res, IngredientApiSearchEntry>;
@useResult
$Res call({String value, IngredientApiSearchDetails data});
@@ -248,7 +259,8 @@ abstract class $IngredientApiSearchEntryCopyWith<$Res> {
}
/// @nodoc
class _$IngredientApiSearchEntryCopyWithImpl<$Res, $Val extends IngredientApiSearchEntry>
class _$IngredientApiSearchEntryCopyWithImpl<$Res,
$Val extends IngredientApiSearchEntry>
implements $IngredientApiSearchEntryCopyWith<$Res> {
_$IngredientApiSearchEntryCopyWithImpl(this._value, this._then);
@@ -287,7 +299,8 @@ class _$IngredientApiSearchEntryCopyWithImpl<$Res, $Val extends IngredientApiSea
/// @nodoc
abstract class _$$IngredientApiSearchEntryImplCopyWith<$Res>
implements $IngredientApiSearchEntryCopyWith<$Res> {
factory _$$IngredientApiSearchEntryImplCopyWith(_$IngredientApiSearchEntryImpl value,
factory _$$IngredientApiSearchEntryImplCopyWith(
_$IngredientApiSearchEntryImpl value,
$Res Function(_$IngredientApiSearchEntryImpl) then) =
__$$IngredientApiSearchEntryImplCopyWithImpl<$Res>;
@override
@@ -300,10 +313,12 @@ abstract class _$$IngredientApiSearchEntryImplCopyWith<$Res>
/// @nodoc
class __$$IngredientApiSearchEntryImplCopyWithImpl<$Res>
extends _$IngredientApiSearchEntryCopyWithImpl<$Res, _$IngredientApiSearchEntryImpl>
extends _$IngredientApiSearchEntryCopyWithImpl<$Res,
_$IngredientApiSearchEntryImpl>
implements _$$IngredientApiSearchEntryImplCopyWith<$Res> {
__$$IngredientApiSearchEntryImplCopyWithImpl(
_$IngredientApiSearchEntryImpl _value, $Res Function(_$IngredientApiSearchEntryImpl) _then)
_$IngredientApiSearchEntryImpl _value,
$Res Function(_$IngredientApiSearchEntryImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -359,9 +374,9 @@ class _$IngredientApiSearchEntryImpl implements _IngredientApiSearchEntry {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$IngredientApiSearchEntryImplCopyWith<_$IngredientApiSearchEntryImpl> get copyWith =>
__$$IngredientApiSearchEntryImplCopyWithImpl<_$IngredientApiSearchEntryImpl>(
this, _$identity);
_$$IngredientApiSearchEntryImplCopyWith<_$IngredientApiSearchEntryImpl>
get copyWith => __$$IngredientApiSearchEntryImplCopyWithImpl<
_$IngredientApiSearchEntryImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -373,8 +388,9 @@ class _$IngredientApiSearchEntryImpl implements _IngredientApiSearchEntry {
abstract class _IngredientApiSearchEntry implements IngredientApiSearchEntry {
factory _IngredientApiSearchEntry(
{required final String value,
required final IngredientApiSearchDetails data}) = _$IngredientApiSearchEntryImpl;
{required final String value,
required final IngredientApiSearchDetails data}) =
_$IngredientApiSearchEntryImpl;
factory _IngredientApiSearchEntry.fromJson(Map<String, dynamic> json) =
_$IngredientApiSearchEntryImpl.fromJson;
@@ -385,8 +401,8 @@ abstract class _IngredientApiSearchEntry implements IngredientApiSearchEntry {
IngredientApiSearchDetails get data;
@override
@JsonKey(ignore: true)
_$$IngredientApiSearchEntryImplCopyWith<_$IngredientApiSearchEntryImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$IngredientApiSearchEntryImplCopyWith<_$IngredientApiSearchEntryImpl>
get copyWith => throw _privateConstructorUsedError;
}
IngredientApiSearch _$IngredientApiSearchFromJson(Map<String, dynamic> json) {
@@ -395,7 +411,8 @@ IngredientApiSearch _$IngredientApiSearchFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$IngredientApiSearch {
List<IngredientApiSearchEntry> get suggestions => throw _privateConstructorUsedError;
List<IngredientApiSearchEntry> get suggestions =>
throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
@@ -439,8 +456,8 @@ class _$IngredientApiSearchCopyWithImpl<$Res, $Val extends IngredientApiSearch>
/// @nodoc
abstract class _$$IngredientApiSearchImplCopyWith<$Res>
implements $IngredientApiSearchCopyWith<$Res> {
factory _$$IngredientApiSearchImplCopyWith(
_$IngredientApiSearchImpl value, $Res Function(_$IngredientApiSearchImpl) then) =
factory _$$IngredientApiSearchImplCopyWith(_$IngredientApiSearchImpl value,
$Res Function(_$IngredientApiSearchImpl) then) =
__$$IngredientApiSearchImplCopyWithImpl<$Res>;
@override
@useResult
@@ -451,8 +468,8 @@ abstract class _$$IngredientApiSearchImplCopyWith<$Res>
class __$$IngredientApiSearchImplCopyWithImpl<$Res>
extends _$IngredientApiSearchCopyWithImpl<$Res, _$IngredientApiSearchImpl>
implements _$$IngredientApiSearchImplCopyWith<$Res> {
__$$IngredientApiSearchImplCopyWithImpl(
_$IngredientApiSearchImpl _value, $Res Function(_$IngredientApiSearchImpl) _then)
__$$IngredientApiSearchImplCopyWithImpl(_$IngredientApiSearchImpl _value,
$Res Function(_$IngredientApiSearchImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -472,7 +489,8 @@ class __$$IngredientApiSearchImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$IngredientApiSearchImpl implements _IngredientApiSearch {
_$IngredientApiSearchImpl({required final List<IngredientApiSearchEntry> suggestions})
_$IngredientApiSearchImpl(
{required final List<IngredientApiSearchEntry> suggestions})
: _suggestions = suggestions;
factory _$IngredientApiSearchImpl.fromJson(Map<String, dynamic> json) =>
@@ -496,18 +514,21 @@ class _$IngredientApiSearchImpl implements _IngredientApiSearch {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$IngredientApiSearchImpl &&
const DeepCollectionEquality().equals(other._suggestions, _suggestions));
const DeepCollectionEquality()
.equals(other._suggestions, _suggestions));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_suggestions));
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_suggestions));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$IngredientApiSearchImplCopyWith<_$IngredientApiSearchImpl> get copyWith =>
__$$IngredientApiSearchImplCopyWithImpl<_$IngredientApiSearchImpl>(this, _$identity);
__$$IngredientApiSearchImplCopyWithImpl<_$IngredientApiSearchImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -518,7 +539,8 @@ class _$IngredientApiSearchImpl implements _IngredientApiSearch {
}
abstract class _IngredientApiSearch implements IngredientApiSearch {
factory _IngredientApiSearch({required final List<IngredientApiSearchEntry> suggestions}) =
factory _IngredientApiSearch(
{required final List<IngredientApiSearchEntry> suggestions}) =
_$IngredientApiSearchImpl;
factory _IngredientApiSearch.fromJson(Map<String, dynamic> json) =

View File

@@ -24,10 +24,12 @@ Map<String, dynamic> _$$IngredientApiSearchDetailsImplToJson(
'image_thumbnail': instance.imageThumbnail,
};
_$IngredientApiSearchEntryImpl _$$IngredientApiSearchEntryImplFromJson(Map<String, dynamic> json) =>
_$IngredientApiSearchEntryImpl _$$IngredientApiSearchEntryImplFromJson(
Map<String, dynamic> json) =>
_$IngredientApiSearchEntryImpl(
value: json['value'] as String,
data: IngredientApiSearchDetails.fromJson(json['data'] as Map<String, dynamic>),
data: IngredientApiSearchDetails.fromJson(
json['data'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$IngredientApiSearchEntryImplToJson(
@@ -37,14 +39,17 @@ Map<String, dynamic> _$$IngredientApiSearchEntryImplToJson(
'data': instance.data,
};
_$IngredientApiSearchImpl _$$IngredientApiSearchImplFromJson(Map<String, dynamic> json) =>
_$IngredientApiSearchImpl _$$IngredientApiSearchImplFromJson(
Map<String, dynamic> json) =>
_$IngredientApiSearchImpl(
suggestions: (json['suggestions'] as List<dynamic>)
.map((e) => IngredientApiSearchEntry.fromJson(e as Map<String, dynamic>))
.map((e) =>
IngredientApiSearchEntry.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$IngredientApiSearchImplToJson(_$IngredientApiSearchImpl instance) =>
Map<String, dynamic> _$$IngredientApiSearchImplToJson(
_$IngredientApiSearchImpl instance) =>
<String, dynamic>{
'suggestions': instance.suggestions,
};

View File

@@ -22,7 +22,9 @@ Translation _$TranslationFromJson(Map<String, dynamic> json) {
return Translation(
id: (json['id'] as num?)?.toInt(),
uuid: json['uuid'] as String?,
created: json['created'] == null ? null : DateTime.parse(json['created'] as String),
created: json['created'] == null
? null
: DateTime.parse(json['created'] as String),
name: json['name'] as String,
description: json['description'] as String,
exerciseId: (json['exercise_base'] as num?)?.toInt(),
@@ -36,7 +38,8 @@ Translation _$TranslationFromJson(Map<String, dynamic> json) {
.toList();
}
Map<String, dynamic> _$TranslationToJson(Translation instance) => <String, dynamic>{
Map<String, dynamic> _$TranslationToJson(Translation instance) =>
<String, dynamic>{
'id': instance.id,
'uuid': instance.uuid,
'language': instance.languageId,

View File

@@ -22,7 +22,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

@@ -20,7 +20,8 @@ MeasurementEntry _$MeasurementEntryFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) => <String, dynamic>{
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) =>
<String, dynamic>{
'id': instance.id,
'category': instance.category,
'date': toDate(instance.date),

View File

@@ -38,7 +38,8 @@ IngredientImage _$IngredientImageFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) => <String, dynamic>{
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) =>
<String, dynamic>{
'id': instance.id,
'uuid': instance.uuid,
'ingredient_id': instance.ingredientId,

View File

@@ -62,8 +62,8 @@ class Ingredient {
final num fatSaturated;
/// g per 100g of product
@JsonKey(required: true, fromJson: stringToNum, toJson: numToString, name: 'fibres')
final num fibers;
@JsonKey(required: true, fromJson: stringToNum, toJson: numToString)
final num fiber;
/// g per 100g of product
@JsonKey(required: true, fromJson: stringToNum, toJson: numToString)
@@ -82,7 +82,7 @@ class Ingredient {
required this.protein,
required this.fat,
required this.fatSaturated,
required this.fibers,
required this.fiber,
required this.sodium,
this.image,
});

View File

@@ -20,7 +20,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
'protein',
'fat',
'fat_saturated',
'fibres',
'fiber',
'sodium'
],
);
@@ -35,7 +35,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
protein: stringToNum(json['protein'] as String?),
fat: stringToNum(json['fat'] as String?),
fatSaturated: stringToNum(json['fat_saturated'] as String?),
fibers: stringToNum(json['fibres'] as String?),
fiber: stringToNum(json['fiber'] as String?),
sodium: stringToNum(json['sodium'] as String?),
image: json['image'] == null
? null
@@ -43,7 +43,8 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$IngredientToJson(Ingredient instance) => <String, dynamic>{
Map<String, dynamic> _$IngredientToJson(Ingredient instance) =>
<String, dynamic>{
'id': instance.id,
'code': instance.code,
'name': instance.name,
@@ -54,7 +55,7 @@ Map<String, dynamic> _$IngredientToJson(Ingredient instance) => <String, dynamic
'protein': numToString(instance.protein),
'fat': numToString(instance.fat),
'fat_saturated': numToString(instance.fatSaturated),
'fibres': numToString(instance.fibers),
'fiber': numToString(instance.fiber),
'sodium': numToString(instance.sodium),
'image': instance.image,
};

View File

@@ -13,14 +13,16 @@ IngredientWeightUnit _$IngredientWeightUnitFromJson(Map<String, dynamic> json) {
);
return IngredientWeightUnit(
id: (json['id'] as num).toInt(),
weightUnit: WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
weightUnit:
WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
ingredient: Ingredient.fromJson(json['ingredient'] as Map<String, dynamic>),
grams: (json['grams'] as num).toInt(),
amount: (json['amount'] as num).toDouble(),
);
}
Map<String, dynamic> _$IngredientWeightUnitToJson(IngredientWeightUnit instance) =>
Map<String, dynamic> _$IngredientWeightUnitToJson(
IngredientWeightUnit instance) =>
<String, dynamic>{
'id': instance.id,
'weight_unit': instance.weightUnit,

View File

@@ -95,7 +95,7 @@ class Log {
out.carbohydratesSugar = ingredient.carbohydratesSugar * weight / 100;
out.fat = ingredient.fat * weight / 100;
out.fatSaturated = ingredient.fatSaturated * weight / 100;
out.fibers = ingredient.fibers * weight / 100;
out.fiber = ingredient.fiber * weight / 100;
out.sodium = ingredient.sodium * weight / 100;
return out;

View File

@@ -9,7 +9,14 @@ part of 'log.dart';
Log _$LogFromJson(Map<String, dynamic> json) {
$checkKeys(
json,
requiredKeys: const ['id', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount'],
requiredKeys: const [
'id',
'plan',
'datetime',
'ingredient',
'weight_unit',
'amount'
],
);
return Log(
id: (json['id'] as num?)?.toInt(),

View File

@@ -85,7 +85,7 @@ class MealItem {
out.carbohydratesSugar = ingredient.carbohydratesSugar * weight / 100;
out.fat = ingredient.fat * weight / 100;
out.fatSaturated = ingredient.fatSaturated * weight / 100;
out.fibers = ingredient.fibers * weight / 100;
out.fiber = ingredient.fiber * weight / 100;
out.sodium = ingredient.sodium * weight / 100;
return out;

View File

@@ -26,7 +26,7 @@ class NutritionalGoals {
double? carbohydratesSugar = 0;
double? fat = 0;
double? fatSaturated = 0;
double? fibers = 0;
double? fiber = 0;
double? sodium = 0;
NutritionalGoals({
@@ -36,7 +36,7 @@ class NutritionalGoals {
this.carbohydratesSugar,
this.fat,
this.fatSaturated,
this.fibers,
this.fiber,
this.sodium,
}) {
// infer values where we can
@@ -71,7 +71,7 @@ class NutritionalGoals {
carbohydratesSugar: carbohydratesSugar != null ? carbohydratesSugar! / v : null,
fat: fat != null ? fat! / v : null,
fatSaturated: fatSaturated != null ? fatSaturated! / v : null,
fibers: fibers != null ? fibers! / v : null,
fiber: fiber != null ? fiber! / v : null,
sodium: sodium != null ? sodium! / v : null,
);
}
@@ -91,7 +91,7 @@ class NutritionalGoals {
carbohydratesSugar ?? 0,
fat ?? 0,
fatSaturated ?? 0,
fibers ?? 0,
fiber ?? 0,
sodium ?? 0,
);
}
@@ -126,7 +126,7 @@ class NutritionalGoals {
'carbohydratesSugar' => carbohydratesSugar,
'fat' => fat,
'fatSaturated' => fatSaturated,
'fibres' => fibers,
'fiber' => fiber,
'sodium' => sodium,
_ => 0,
};
@@ -134,13 +134,13 @@ class NutritionalGoals {
@override
String toString() {
return 'e: $energy, p: $protein, c: $carbohydrates, cS: $carbohydratesSugar, f: $fat, fS: $fatSaturated, fi: $fibers, s: $sodium';
return 'e: $energy, p: $protein, c: $carbohydrates, cS: $carbohydratesSugar, f: $fat, fS: $fatSaturated, fi: $fiber, s: $sodium';
}
@override
//ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hash(
energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fibers, sodium);
energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fiber, sodium);
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
@@ -155,7 +155,7 @@ class NutritionalGoals {
other.carbohydratesSugar == carbohydratesSugar &&
other.fat == fat &&
other.fatSaturated == fatSaturated &&
other.fibers == fibers &&
other.fiber == fiber &&
other.sodium == sodium;
}
}

View File

@@ -125,7 +125,7 @@ class NutritionalPlan {
fat: goalFat?.toDouble(),
protein: goalProtein?.toDouble(),
carbohydrates: goalCarbohydrates?.toDouble(),
fibers: goalFibers?.toDouble(),
fiber: goalFibers?.toDouble(),
);
}
// if there are no set goals and no defined meals, the goals are still undefined
@@ -141,7 +141,7 @@ class NutritionalPlan {
carbohydrates: sumValues.carbohydrates,
carbohydratesSugar: sumValues.carbohydratesSugar,
fatSaturated: sumValues.fatSaturated,
fibers: sumValues.fibers,
fiber: sumValues.fiber,
sodium: sumValues.sodium,
);
}

View File

@@ -34,7 +34,8 @@ NutritionalPlan _$NutritionalPlanFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) => <String, dynamic>{
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) =>
<String, dynamic>{
'id': instance.id,
'description': instance.description,
'creation_date': toDate(instance.creationDate),

View File

@@ -23,7 +23,7 @@ class NutritionalValues {
double carbohydratesSugar = 0;
double fat = 0;
double fatSaturated = 0;
double fibers = 0;
double fiber = 0;
double sodium = 0;
NutritionalValues();
@@ -35,7 +35,7 @@ class NutritionalValues {
this.carbohydratesSugar,
this.fat,
this.fatSaturated,
this.fibers,
this.fiber,
this.sodium,
);
@@ -51,7 +51,7 @@ class NutritionalValues {
carbohydratesSugar += data.carbohydratesSugar;
fat += data.fat;
fatSaturated += data.fatSaturated;
fibers += data.fibers;
fiber += data.fiber;
sodium += data.sodium;
}
@@ -63,7 +63,7 @@ class NutritionalValues {
carbohydratesSugar + o.carbohydratesSugar,
fat + o.fat,
fatSaturated + o.fatSaturated,
fibers + o.fibers,
fiber + o.fiber,
sodium + o.sodium,
);
}
@@ -76,7 +76,7 @@ class NutritionalValues {
carbohydratesSugar / o,
fat / o,
fatSaturated / o,
fibers / o,
fiber / o,
sodium / o,
);
}
@@ -91,7 +91,7 @@ class NutritionalValues {
carbohydratesSugar == other.carbohydratesSugar &&
fat == other.fat &&
fatSaturated == other.fatSaturated &&
fibers == other.fibers &&
fiber == other.fiber &&
sodium == other.sodium;
}
@@ -103,7 +103,7 @@ class NutritionalValues {
'carbohydratesSugar' => carbohydratesSugar,
'fat' => fat,
'fatSaturated' => fatSaturated,
'fibres' => fibers,
'fiber' => fiber,
'sodium' => sodium,
_ => 0,
};
@@ -111,11 +111,11 @@ class NutritionalValues {
@override
String toString() {
return 'e: $energy, p: $protein, c: $carbohydrates, cS: $carbohydratesSugar, f: $fat, fS: $fatSaturated, fi: $fibers, s: $sodium';
return 'e: $energy, p: $protein, c: $carbohydrates, cS: $carbohydratesSugar, f: $fat, fS: $fatSaturated, fi: $fiber, s: $sodium';
}
@override
//ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hash(
energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fibers, sodium);
energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fiber, sodium);
}

View File

@@ -17,7 +17,8 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
};

View File

@@ -9,7 +9,13 @@ part of 'profile.dart';
Profile _$ProfileFromJson(Map<String, dynamic> json) {
$checkKeys(
json,
requiredKeys: const ['username', 'email_verified', 'is_trustworthy', 'weight_unit', 'email'],
requiredKeys: const [
'username',
'email_verified',
'is_trustworthy',
'weight_unit',
'email'
],
);
return Profile(
username: json['username'] as String,

View File

@@ -15,7 +15,8 @@ Day _$DayFromJson(Map<String, dynamic> json) {
..id = (json['id'] as num?)?.toInt()
..workoutId = (json['training'] as num).toInt()
..description = json['description'] as String
..daysOfWeek = (json['day'] as List<dynamic>).map((e) => (e as num).toInt()).toList();
..daysOfWeek =
(json['day'] as List<dynamic>).map((e) => (e as num).toInt()).toList();
}
Map<String, dynamic> _$DayToJson(Day instance) => <String, dynamic>{

View File

@@ -17,7 +17,8 @@ RepetitionUnit _$RepetitionUnitFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) => <String, dynamic>{
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
};

View File

@@ -9,7 +9,14 @@ part of 'session.dart';
WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
$checkKeys(
json,
requiredKeys: const ['id', 'workout', 'date', 'impression', 'time_start', 'time_end'],
requiredKeys: const [
'id',
'workout',
'date',
'impression',
'time_start',
'time_end'
],
);
return WorkoutSession()
..id = (json['id'] as num?)?.toInt()
@@ -21,7 +28,8 @@ WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
..timeEnd = stringToTime(json['time_end'] as String?);
}
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) => <String, dynamic>{
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) =>
<String, dynamic>{
'id': instance.id,
'workout': instance.workoutId,
'date': toDate(instance.date),

View File

@@ -17,7 +17,8 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
};

View File

@@ -19,7 +19,8 @@ WorkoutPlan _$WorkoutPlanFromJson(Map<String, dynamic> json) {
);
}
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) => <String, dynamic>{
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) =>
<String, dynamic>{
'id': instance.id,
'creation_date': instance.creationDate.toIso8601String(),
'name': instance.name,

View File

@@ -100,7 +100,7 @@ class FlNutritionalPlanGoalWidgetState extends State<FlNutritionalPlanGoalWidget
today.carbohydrates / goals.carbohydrates!,
if (goals.fat != null && goals.fat! > 0) today.fat / goals.fat!,
if (goals.energy != null && goals.energy! > 0) today.energy / goals.energy!,
if (goals.fibers != null && goals.fibers! > 0) today.fibers / goals.fibers!,
if (goals.fiber != null && goals.fiber! > 0) today.fiber / goals.fiber!,
].reduce(max);
final normWidth = constraints.maxWidth / maxVal;
@@ -132,13 +132,13 @@ class FlNutritionalPlanGoalWidgetState extends State<FlNutritionalPlanGoalWidget
const SizedBox(height: 2),
_diyGauge(context, normWidth, goals.energy, today.energy),
// optionally display the advanced macro goals:
if (goals.fibers != null)
if (goals.fiber != null)
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
const SizedBox(height: 8),
Text(fmtMacro(AppLocalizations.of(context).fibres, today.fibers, goals.fibers,
Text(fmtMacro(AppLocalizations.of(context).fiber, today.fiber, goals.fiber,
AppLocalizations.of(context).g)),
const SizedBox(height: 2),
_diyGauge(context, normWidth, goals.fibers, today.fibers),
_diyGauge(context, normWidth, goals.fiber, today.fiber),
]),
],
);
@@ -267,7 +267,7 @@ class NutritionalDiaryChartWidgetFlState extends State<NutritionalDiaryChartWidg
2 => AppLocalizations.of(context).sugars,
3 => AppLocalizations.of(context).fat,
4 => AppLocalizations.of(context).saturatedFat,
5 => AppLocalizations.of(context).fibres,
5 => AppLocalizations.of(context).fiber,
_ => '',
};
return SideTitleWidget(
@@ -400,7 +400,7 @@ class NutritionalDiaryChartWidgetFlState extends State<NutritionalDiaryChartWidg
barchartGroup(2, barsSpace, barsWidth, 'carbohydratesSugar'),
barchartGroup(3, barsSpace, barsWidth, 'fat'),
barchartGroup(4, barsSpace, barsWidth, 'fatSaturated'),
if (widget._nutritionalPlan.nutritionalGoals.fibers != null)
if (widget._nutritionalPlan.nutritionalGoals.fiber != null)
barchartGroup(5, barsSpace, barsWidth, 'fibers'),
],
),

View File

@@ -148,12 +148,12 @@ class MacronutrientsTable extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: tablePadding),
child: Text(AppLocalizations.of(context).fibres),
child: Text(AppLocalizations.of(context).fiber),
),
const Text(''),
const Text(''),
Text(nutritionalGoals.fibers != null
? nutritionalGoals.fibers!.toStringAsFixed(0) + AppLocalizations.of(context).g
Text(nutritionalGoals.fiber != null
? nutritionalGoals.fiber!.toStringAsFixed(0) + AppLocalizations.of(context).g
: ''),
],
),

View File

@@ -188,11 +188,11 @@ class NutritionDiaryTable extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: tablePadding),
child: Text(AppLocalizations.of(context).fibres),
child: Text(AppLocalizations.of(context).fiber),
),
Text(AppLocalizations.of(context).gValue(planned.fibers.toStringAsFixed(0))),
Text(AppLocalizations.of(context).gValue(logged.fibers.toStringAsFixed(0))),
Text((logged.fibers - planned.fibers).toStringAsFixed(0)),
Text(AppLocalizations.of(context).gValue(planned.fiber.toStringAsFixed(0))),
Text(AppLocalizations.of(context).gValue(logged.fiber.toStringAsFixed(0))),
Text((logged.fiber - planned.fiber).toStringAsFixed(0)),
],
),
TableRow(

View File

@@ -34,7 +34,8 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
);
}
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
class _FakeStreamedResponse_1 extends _i1.SmartFake
implements _i2.StreamedResponse {
_FakeStreamedResponse_1(
Object parent,
Invocation parentInvocation,
@@ -254,12 +255,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
) as _i3.Future<_i6.Uint8List>);
@override
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
(super.noSuchMethod(
Invocation.method(
#send,
[request],
),
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
returnValue:
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
this,
Invocation.method(
#send,

View File

@@ -29,7 +29,8 @@ import 'package:wger/providers/exercises.dart' as _i9;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -39,7 +40,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
);
}
class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase {
class _FakeExerciseDatabase_1 extends _i1.SmartFake
implements _i3.ExerciseDatabase {
_FakeExerciseDatabase_1(
Object parent,
Invocation parentInvocation,
@@ -59,7 +61,8 @@ class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise {
);
}
class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory {
class _FakeExerciseCategory_3 extends _i1.SmartFake
implements _i5.ExerciseCategory {
_FakeExerciseCategory_3(
Object parent,
Invocation parentInvocation,
@@ -156,7 +159,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as List<_i4.Exercise>);
@override
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(
#filteredExercises,
newFilteredExercises,
@@ -165,7 +169,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
);
@override
Map<int, List<_i4.Exercise>> get exerciseBasesByVariation => (super.noSuchMethod(
Map<int, List<_i4.Exercise>> get exerciseBasesByVariation =>
(super.noSuchMethod(
Invocation.getter(#exerciseBasesByVariation),
returnValue: <int, List<_i4.Exercise>>{},
) as Map<int, List<_i4.Exercise>>);
@@ -377,7 +382,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
_i10.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetExercise,
[exerciseId],
@@ -427,7 +433,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
_i10.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
(super.noSuchMethod(
Invocation.method(
#initCacheTimesLocalPrefs,
[],
@@ -473,7 +480,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i10.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#updateExerciseCache,
[database],
@@ -483,7 +491,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i10.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetMuscles,
[database],
@@ -493,7 +502,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i10.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetCategories,
[database],
@@ -503,7 +513,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i10.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetLanguages,
[database],
@@ -513,7 +524,8 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
) as _i10.Future<void>);
@override
_i10.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i10.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetEquipments,
[database],

View File

@@ -34,7 +34,8 @@ import 'package:wger/providers/user.dart' as _i15;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -87,7 +88,8 @@ class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias {
/// A class which mocks [AddExerciseProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvider {
class MockAddExerciseProvider extends _i1.Mock
implements _i7.AddExerciseProvider {
MockAddExerciseProvider() {
_i1.throwOnMissingStub(this);
}
@@ -376,7 +378,8 @@ class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvide
) as _i13.Future<void>);
@override
_i13.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) =>
_i13.Future<_i4.Translation> addExerciseTranslation(
_i4.Translation? exercise) =>
(super.noSuchMethod(
Invocation.method(
#addExerciseTranslation,

View File

@@ -10,7 +10,7 @@
"carbohydrates_sugar": "66.000",
"fat": "0.000",
"fat_saturated": "0.000",
"fibres": null,
"fiber": null,
"sodium": "0.000",
"license": 5,
"license_author": "Open Food Facts",

View File

@@ -10,7 +10,7 @@
"carbohydrates_sugar": "2.320",
"fat": "4.820",
"fat_saturated": "0.714",
"fibres": "6.960",
"fiber": "6.960",
"sodium": "0.000",
"license": 5,
"license_author": "Open Food Facts",

View File

@@ -10,7 +10,7 @@
"carbohydrates_sugar": "5.300",
"fat": "0.100",
"fat_saturated": "0.000",
"fibres": "5.000",
"fiber": "5.000",
"sodium": "0.480",
"license": 5,
"license_author": "Open Food Facts",

View File

@@ -21,7 +21,7 @@
"carbohydrates_sugar": 139.62,
"fat": 4.92,
"fat_saturated": 0.71,
"fibres": 11.96,
"fiber": 11.96,
"sodium": 0.48,
"energy_kilojoule": 3568.95
},
@@ -60,7 +60,7 @@
"carbohydrates_sugar": "5.300",
"fat": "0.100",
"fat_saturated": "0.000",
"fibres": "5.000",
"fiber": "5.000",
"sodium": "0.480",
"license": {
"id": 5,
@@ -98,7 +98,7 @@
"carbohydrates_sugar": "2.320",
"fat": "4.820",
"fat_saturated": "0.714",
"fibres": "6.960",
"fiber": "6.960",
"sodium": "0.000",
"license": {
"id": 5,
@@ -151,7 +151,7 @@
"carbohydrates_sugar": "66.000",
"fat": "0.000",
"fat_saturated": "0.000",
"fibres": null,
"fiber": null,
"sodium": "0.000",
"license": {
"id": 5,
@@ -196,7 +196,7 @@
"carbohydrates_sugar": 139.62,
"fat": 4.92,
"fat_saturated": 0.71,
"fibres": 11.96,
"fiber": 11.96,
"sodium": 0.48,
"energy_kilojoule": 3568.95
}

View File

@@ -1,25 +1,25 @@
{
"count":1,
"next":null,
"previous":null,
"results":[
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id":9436,
"code":"0013087245950",
"name":" Gâteau double chocolat ",
"creation_date":"2020-12-20",
"update_date":"2020-12-20",
"energy":360,
"protein":"5.000",
"carbohydrates":"45.000",
"carbohydrates_sugar":"27.000",
"fat":"18.000",
"fat_saturated":"4.500",
"fibres":"2.000",
"sodium":"0.356",
"license":5,
"license_author":"Open Food Facts",
"language":12
"id": 9436,
"code": "0013087245950",
"name": " Gâteau double chocolat ",
"creation_date": "2020-12-20",
"update_date": "2020-12-20",
"energy": 360,
"protein": "5.000",
"carbohydrates": "45.000",
"carbohydrates_sugar": "27.000",
"fat": "18.000",
"fat_saturated": "4.500",
"fiber": "2.000",
"sodium": "0.356",
"license": 5,
"license_author": "Open Food Facts",
"language": 12
}
]
}

View File

@@ -195,7 +195,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
) as _i6.Future<void>);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -241,7 +242,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
#fetch,
[uri],
),
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
@override
@@ -266,7 +268,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
uri,
],
),
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
@override
@@ -282,7 +285,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
uri,
],
),
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
@override

View File

@@ -195,7 +195,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
) as _i6.Future<void>);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -241,7 +242,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
#fetch,
[uri],
),
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
@override
@@ -266,7 +268,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
uri,
],
),
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
@override
@@ -282,7 +285,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
uri,
],
),
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
@override

View File

@@ -25,7 +25,8 @@ import 'package:wger/providers/measurement.dart' as _i4;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -35,7 +36,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
);
}
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
class _FakeMeasurementCategory_1 extends _i1.SmartFake
implements _i3.MeasurementCategory {
_FakeMeasurementCategory_1(
Object parent,
Invocation parentInvocation,
@@ -48,7 +50,8 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.Measuremen
/// A class which mocks [MeasurementProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvider {
class MockMeasurementProvider extends _i1.Mock
implements _i4.MeasurementProvider {
MockMeasurementProvider() {
_i1.throwOnMissingStub(this);
}
@@ -129,7 +132,8 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
) as _i5.Future<void>);
@override
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
(super.noSuchMethod(
Invocation.method(
#addCategory,
[category],

View File

@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -154,7 +155,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -179,7 +181,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -195,7 +198,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override

View File

@@ -50,7 +50,7 @@ void main() {
expect(find.text('4 g'), findsOneWidget, reason: 'find grams of sugar');
expect(find.text('29 g'), findsOneWidget, reason: 'find grams of fat');
expect(find.text('14 g'), findsOneWidget, reason: 'find grams of saturated fat');
expect(find.text('50 g'), findsOneWidget, reason: 'find grams of fibre');
expect(find.text('50 g'), findsOneWidget, reason: 'find grams of fiber');
expect(find.text('100 g Water'), findsOneWidget, reason: 'Name of ingredient');
expect(find.text('75 g Burger soup'), findsOneWidget, reason: 'Name of ingredient');

View File

@@ -28,7 +28,8 @@ import 'package:wger/providers/nutrition.dart' as _i7;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -38,7 +39,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
);
}
class _FakeNutritionalPlan_1 extends _i1.SmartFake implements _i3.NutritionalPlan {
class _FakeNutritionalPlan_1 extends _i1.SmartFake
implements _i3.NutritionalPlan {
_FakeNutritionalPlan_1(
Object parent,
Invocation parentInvocation,
@@ -81,7 +83,8 @@ class _FakeIngredient_4 extends _i1.SmartFake implements _i6.Ingredient {
/// A class which mocks [NutritionPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansProvider {
class MockNutritionPlansProvider extends _i1.Mock
implements _i7.NutritionPlansProvider {
MockNutritionPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -167,12 +170,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<void>);
@override
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanSparse,
[planId],
),
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
returnValue:
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
this,
Invocation.method(
#fetchAndSetPlanSparse,
@@ -182,12 +187,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<_i3.NutritionalPlan>);
@override
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanFull,
[planId],
),
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
returnValue:
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
this,
Invocation.method(
#fetchAndSetPlanFull,
@@ -197,12 +204,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<_i3.NutritionalPlan>);
@override
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) => (super.noSuchMethod(
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) =>
(super.noSuchMethod(
Invocation.method(
#addPlan,
[planData],
),
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
returnValue:
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
this,
Invocation.method(
#addPlan,
@@ -307,7 +316,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<_i5.MealItem>);
@override
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) => (super.noSuchMethod(
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) =>
(super.noSuchMethod(
Invocation.method(
#deleteMealItem,
[mealItem],
@@ -317,7 +327,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<void>);
@override
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod(
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) =>
(super.noSuchMethod(
Invocation.method(
#fetchIngredient,
[ingredientId],
@@ -356,12 +367,13 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
#searchEnglish: searchEnglish,
},
),
returnValue:
_i8.Future<List<_i9.IngredientApiSearchEntry>>.value(<_i9.IngredientApiSearchEntry>[]),
returnValue: _i8.Future<List<_i9.IngredientApiSearchEntry>>.value(
<_i9.IngredientApiSearchEntry>[]),
) as _i8.Future<List<_i9.IngredientApiSearchEntry>>);
@override
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#searchIngredientWithCode,
[code],
@@ -416,7 +428,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<void>);
@override
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) => (super.noSuchMethod(
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetLogs,
[plan],

View File

@@ -36,7 +36,7 @@ void main() {
protein: 5,
fat: 20,
fatSaturated: 7,
fibers: 12,
fiber: 12,
sodium: 0.5,
);

View File

@@ -28,7 +28,8 @@ import 'package:wger/providers/nutrition.dart' as _i7;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -38,7 +39,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
);
}
class _FakeNutritionalPlan_1 extends _i1.SmartFake implements _i3.NutritionalPlan {
class _FakeNutritionalPlan_1 extends _i1.SmartFake
implements _i3.NutritionalPlan {
_FakeNutritionalPlan_1(
Object parent,
Invocation parentInvocation,
@@ -81,7 +83,8 @@ class _FakeIngredient_4 extends _i1.SmartFake implements _i6.Ingredient {
/// A class which mocks [NutritionPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansProvider {
class MockNutritionPlansProvider extends _i1.Mock
implements _i7.NutritionPlansProvider {
MockNutritionPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -167,12 +170,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<void>);
@override
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanSparse,
[planId],
),
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
returnValue:
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
this,
Invocation.method(
#fetchAndSetPlanSparse,
@@ -182,12 +187,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<_i3.NutritionalPlan>);
@override
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanFull,
[planId],
),
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
returnValue:
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
this,
Invocation.method(
#fetchAndSetPlanFull,
@@ -197,12 +204,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<_i3.NutritionalPlan>);
@override
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) => (super.noSuchMethod(
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) =>
(super.noSuchMethod(
Invocation.method(
#addPlan,
[planData],
),
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
returnValue:
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
this,
Invocation.method(
#addPlan,
@@ -307,7 +316,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<_i5.MealItem>);
@override
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) => (super.noSuchMethod(
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) =>
(super.noSuchMethod(
Invocation.method(
#deleteMealItem,
[mealItem],
@@ -317,7 +327,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<void>);
@override
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod(
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) =>
(super.noSuchMethod(
Invocation.method(
#fetchIngredient,
[ingredientId],
@@ -356,12 +367,13 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
#searchEnglish: searchEnglish,
},
),
returnValue:
_i8.Future<List<_i9.IngredientApiSearchEntry>>.value(<_i9.IngredientApiSearchEntry>[]),
returnValue: _i8.Future<List<_i9.IngredientApiSearchEntry>>.value(
<_i9.IngredientApiSearchEntry>[]),
) as _i8.Future<List<_i9.IngredientApiSearchEntry>>);
@override
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#searchIngredientWithCode,
[code],
@@ -416,7 +428,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
) as _i8.Future<void>);
@override
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) => (super.noSuchMethod(
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetLogs,
[plan],

View File

@@ -41,7 +41,7 @@ void main() {
carbohydratesSugar: 9.5,
fat: 59.0,
fatSaturated: 37.75,
fibers: 52.5,
fiber: 52.5,
sodium: 30.5));
});
test('Test NutritionalPlan.nutritionalValues based on 3 macros and energy', () {

View File

@@ -68,7 +68,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
);
}
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
class _FakeStreamedResponse_4 extends _i1.SmartFake
implements _i3.StreamedResponse {
_FakeStreamedResponse_4(
Object parent,
Invocation parentInvocation,
@@ -123,7 +124,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -194,7 +197,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -210,7 +214,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -275,7 +280,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
);
@override
set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod(
set applicationVersion(_i6.PackageInfo? _applicationVersion) =>
super.noSuchMethod(
Invocation.setter(
#applicationVersion,
_applicationVersion,
@@ -409,7 +415,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
#locale: locale,
},
),
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
<String, _i2.LoginActions>{}),
) as _i5.Future<Map<String, _i2.LoginActions>>);
@override
@@ -427,7 +434,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
serverUrl,
],
),
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
<String, _i2.LoginActions>{}),
) as _i5.Future<Map<String, _i2.LoginActions>>);
@override
@@ -727,12 +735,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
) as _i5.Future<_i10.Uint8List>);
@override
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod(
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) =>
(super.noSuchMethod(
Invocation.method(
#send,
[request],
),
returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
returnValue:
_i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
this,
Invocation.method(
#send,

View File

@@ -68,7 +68,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
);
}
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
class _FakeStreamedResponse_4 extends _i1.SmartFake
implements _i2.StreamedResponse {
_FakeStreamedResponse_4(
Object parent,
Invocation parentInvocation,
@@ -114,7 +115,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
);
@override
set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod(
set applicationVersion(_i4.PackageInfo? _applicationVersion) =>
super.noSuchMethod(
Invocation.setter(
#applicationVersion,
_applicationVersion,
@@ -248,7 +250,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
#locale: locale,
},
),
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
<String, _i3.LoginActions>{}),
) as _i5.Future<Map<String, _i3.LoginActions>>);
@override
@@ -266,7 +269,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
serverUrl,
],
),
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
<String, _i3.LoginActions>{}),
) as _i5.Future<Map<String, _i3.LoginActions>>);
@override
@@ -401,7 +405,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -447,7 +452,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -472,7 +478,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -488,7 +495,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -727,12 +735,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
) as _i5.Future<_i10.Uint8List>);
@override
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
(super.noSuchMethod(
Invocation.method(
#send,
[request],
),
returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
returnValue:
_i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
this,
Invocation.method(
#send,

View File

@@ -34,7 +34,8 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
);
}
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
class _FakeStreamedResponse_1 extends _i1.SmartFake
implements _i2.StreamedResponse {
_FakeStreamedResponse_1(
Object parent,
Invocation parentInvocation,
@@ -254,12 +255,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
) as _i3.Future<_i6.Uint8List>);
@override
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
(super.noSuchMethod(
Invocation.method(
#send,
[request],
),
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
returnValue:
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
this,
Invocation.method(
#send,

View File

@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -154,7 +155,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -179,7 +181,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -195,7 +198,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override

View File

@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -154,7 +155,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -179,7 +181,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -195,7 +198,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override

View File

@@ -26,7 +26,8 @@ import 'package:wger/providers/user.dart' as _i7;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -49,7 +50,8 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
/// A class which mocks [BodyWeightProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider {
class MockBodyWeightProvider extends _i1.Mock
implements _i4.BodyWeightProvider {
MockBodyWeightProvider() {
_i1.throwOnMissingStub(this);
}
@@ -109,7 +111,8 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
) as _i3.WeightEntry);
@override
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
_i3.WeightEntry? findByDate(DateTime? date) =>
(super.noSuchMethod(Invocation.method(
#findByDate,
[date],
)) as _i3.WeightEntry?);
@@ -120,11 +123,13 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
#fetchAndSetEntries,
[],
),
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
returnValue:
_i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
) as _i5.Future<List<_i3.WeightEntry>>);
@override
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
(super.noSuchMethod(
Invocation.method(
#addEntry,
[entry],

View File

@@ -71,7 +71,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
);
}
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
implements _i4.WgerBaseProvider {
_FakeWgerBaseProvider_4(
Object parent,
Invocation parentInvocation,
@@ -81,7 +82,8 @@ class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvi
);
}
class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase {
class _FakeExerciseDatabase_5 extends _i1.SmartFake
implements _i5.ExerciseDatabase {
_FakeExerciseDatabase_5(
Object parent,
Invocation parentInvocation,
@@ -101,7 +103,8 @@ class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise {
);
}
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory {
class _FakeExerciseCategory_7 extends _i1.SmartFake
implements _i7.ExerciseCategory {
_FakeExerciseCategory_7(
Object parent,
Invocation parentInvocation,
@@ -186,7 +189,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -232,7 +236,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i11.Future<Map<String, dynamic>>);
@override
@@ -257,7 +262,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i11.Future<Map<String, dynamic>>);
@override
@@ -273,7 +279,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i11.Future<Map<String, dynamic>>);
@override
@@ -359,7 +366,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as List<_i6.Exercise>);
@override
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(
#filteredExercises,
newFilteredExercises,
@@ -368,7 +376,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
);
@override
Map<int, List<_i6.Exercise>> get exerciseBasesByVariation => (super.noSuchMethod(
Map<int, List<_i6.Exercise>> get exerciseBasesByVariation =>
(super.noSuchMethod(
Invocation.getter(#exerciseBasesByVariation),
returnValue: <int, List<_i6.Exercise>>{},
) as Map<int, List<_i6.Exercise>>);
@@ -580,7 +589,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<_i6.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
_i11.Future<_i6.Exercise> fetchAndSetExercise(int? exerciseId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetExercise,
[exerciseId],
@@ -630,7 +640,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
(super.noSuchMethod(
Invocation.method(
#initCacheTimesLocalPrefs,
[],
@@ -676,7 +687,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#updateExerciseCache,
[database],
@@ -686,7 +698,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetMuscles,
[database],
@@ -696,7 +709,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetCategories,
[database],
@@ -706,7 +720,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetLanguages,
[database],
@@ -716,7 +731,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
) as _i11.Future<void>);
@override
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetEquipments,
[database],

View File

@@ -34,7 +34,8 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -54,7 +55,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(
Object parent,
Invocation parentInvocation,
@@ -104,7 +106,8 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
);
}
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
class _FakeWorkoutSession_7 extends _i1.SmartFake
implements _i9.WorkoutSession {
_FakeWorkoutSession_7(
Object parent,
Invocation parentInvocation,
@@ -127,7 +130,8 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
/// A class which mocks [WorkoutPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
class MockWorkoutPlansProvider extends _i1.Mock
implements _i11.WorkoutPlansProvider {
MockWorkoutPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -264,7 +268,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<void>);
@override
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanSparse,
[planId],
@@ -279,7 +284,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetWorkoutPlanFull,
[workoutId],
@@ -294,7 +300,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#addWorkout,
[workout],
@@ -309,7 +316,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#editWorkout,
[workout],
@@ -341,7 +349,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
base,
],
),
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i12.Future<Map<String, dynamic>>);
@override
@@ -461,7 +470,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<List<_i7.Set>>);
@override
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
(super.noSuchMethod(
Invocation.method(
#fetchComputedSettings,
[workoutSet],
@@ -506,7 +516,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<void>);
@override
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
(super.noSuchMethod(
Invocation.method(
#addSetting,
[workoutSetting],
@@ -530,12 +541,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<dynamic>);
@override
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
(super.noSuchMethod(
Invocation.method(
#addSession,
[session],
),
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
returnValue:
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
this,
Invocation.method(
#addSession,

View File

@@ -24,7 +24,8 @@ import 'package:wger/providers/body_weight.dart' as _i4;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -47,7 +48,8 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
/// A class which mocks [BodyWeightProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider {
class MockBodyWeightProvider extends _i1.Mock
implements _i4.BodyWeightProvider {
MockBodyWeightProvider() {
_i1.throwOnMissingStub(this);
}
@@ -107,7 +109,8 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
) as _i3.WeightEntry);
@override
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
_i3.WeightEntry? findByDate(DateTime? date) =>
(super.noSuchMethod(Invocation.method(
#findByDate,
[date],
)) as _i3.WeightEntry?);
@@ -118,11 +121,13 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
#fetchAndSetEntries,
[],
),
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
returnValue:
_i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
) as _i5.Future<List<_i3.WeightEntry>>);
@override
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
(super.noSuchMethod(
Invocation.method(
#addEntry,
[entry],

View File

@@ -34,7 +34,8 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -54,7 +55,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(
Object parent,
Invocation parentInvocation,
@@ -104,7 +106,8 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
);
}
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
class _FakeWorkoutSession_7 extends _i1.SmartFake
implements _i9.WorkoutSession {
_FakeWorkoutSession_7(
Object parent,
Invocation parentInvocation,
@@ -127,7 +130,8 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
/// A class which mocks [WorkoutPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
class MockWorkoutPlansProvider extends _i1.Mock
implements _i11.WorkoutPlansProvider {
MockWorkoutPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -264,7 +268,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<void>);
@override
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanSparse,
[planId],
@@ -279,7 +284,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetWorkoutPlanFull,
[workoutId],
@@ -294,7 +300,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#addWorkout,
[workout],
@@ -309,7 +316,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#editWorkout,
[workout],
@@ -341,7 +349,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
base,
],
),
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i12.Future<Map<String, dynamic>>);
@override
@@ -461,7 +470,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<List<_i7.Set>>);
@override
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
(super.noSuchMethod(
Invocation.method(
#fetchComputedSettings,
[workoutSet],
@@ -506,7 +516,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<void>);
@override
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
(super.noSuchMethod(
Invocation.method(
#addSetting,
[workoutSetting],
@@ -530,12 +541,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<dynamic>);
@override
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
(super.noSuchMethod(
Invocation.method(
#addSession,
[session],
),
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
returnValue:
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
this,
Invocation.method(
#addSession,

View File

@@ -34,7 +34,8 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -54,7 +55,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(
Object parent,
Invocation parentInvocation,
@@ -104,7 +106,8 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
);
}
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
class _FakeWorkoutSession_7 extends _i1.SmartFake
implements _i9.WorkoutSession {
_FakeWorkoutSession_7(
Object parent,
Invocation parentInvocation,
@@ -127,7 +130,8 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
/// A class which mocks [WorkoutPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
class MockWorkoutPlansProvider extends _i1.Mock
implements _i11.WorkoutPlansProvider {
MockWorkoutPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -264,7 +268,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<void>);
@override
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanSparse,
[planId],
@@ -279,7 +284,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetWorkoutPlanFull,
[workoutId],
@@ -294,7 +300,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#addWorkout,
[workout],
@@ -309,7 +316,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<_i5.WorkoutPlan>);
@override
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#editWorkout,
[workout],
@@ -341,7 +349,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
base,
],
),
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i12.Future<Map<String, dynamic>>);
@override
@@ -461,7 +470,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<List<_i7.Set>>);
@override
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
(super.noSuchMethod(
Invocation.method(
#fetchComputedSettings,
[workoutSet],
@@ -506,7 +516,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<void>);
@override
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
(super.noSuchMethod(
Invocation.method(
#addSetting,
[workoutSetting],
@@ -530,12 +541,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
) as _i12.Future<dynamic>);
@override
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
(super.noSuchMethod(
Invocation.method(
#addSession,
[session],
),
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
returnValue:
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
this,
Invocation.method(
#addSession,

View File

@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -154,7 +155,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -179,7 +181,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -195,7 +198,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override

View File

@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -154,7 +155,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -179,7 +181,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -195,7 +198,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override

View File

@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -154,7 +155,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -179,7 +181,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
@@ -195,7 +198,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
uri,
],
),
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override

View File

@@ -42,7 +42,8 @@ import 'package:wger/providers/workout_plans.dart' as _i22;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(
Object parent,
Invocation parentInvocation,
@@ -52,7 +53,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
);
}
class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase {
class _FakeExerciseDatabase_1 extends _i1.SmartFake
implements _i3.ExerciseDatabase {
_FakeExerciseDatabase_1(
Object parent,
Invocation parentInvocation,
@@ -72,7 +74,8 @@ class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise {
);
}
class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory {
class _FakeExerciseCategory_3 extends _i1.SmartFake
implements _i5.ExerciseCategory {
_FakeExerciseCategory_3(
Object parent,
Invocation parentInvocation,
@@ -162,7 +165,8 @@ class _FakeWeightUnit_11 extends _i1.SmartFake implements _i11.WeightUnit {
);
}
class _FakeRepetitionUnit_12 extends _i1.SmartFake implements _i12.RepetitionUnit {
class _FakeRepetitionUnit_12 extends _i1.SmartFake
implements _i12.RepetitionUnit {
_FakeRepetitionUnit_12(
Object parent,
Invocation parentInvocation,
@@ -212,7 +216,8 @@ class _FakeSetting_16 extends _i1.SmartFake implements _i16.Setting {
);
}
class _FakeWorkoutSession_17 extends _i1.SmartFake implements _i17.WorkoutSession {
class _FakeWorkoutSession_17 extends _i1.SmartFake
implements _i17.WorkoutSession {
_FakeWorkoutSession_17(
Object parent,
Invocation parentInvocation,
@@ -289,7 +294,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as List<_i4.Exercise>);
@override
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(
#filteredExercises,
newFilteredExercises,
@@ -298,7 +304,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
);
@override
Map<int, List<_i4.Exercise>> get exerciseBasesByVariation => (super.noSuchMethod(
Map<int, List<_i4.Exercise>> get exerciseBasesByVariation =>
(super.noSuchMethod(
Invocation.getter(#exerciseBasesByVariation),
returnValue: <int, List<_i4.Exercise>>{},
) as Map<int, List<_i4.Exercise>>);
@@ -510,7 +517,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
_i20.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetExercise,
[exerciseId],
@@ -560,7 +568,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
_i20.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
(super.noSuchMethod(
Invocation.method(
#initCacheTimesLocalPrefs,
[],
@@ -606,7 +615,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i20.Future<void> updateExerciseCache(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#updateExerciseCache,
[database],
@@ -616,7 +626,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i20.Future<void> fetchAndSetMuscles(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetMuscles,
[database],
@@ -626,7 +637,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i20.Future<void> fetchAndSetCategories(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetCategories,
[database],
@@ -636,7 +648,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i20.Future<void> fetchAndSetLanguages(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetLanguages,
[database],
@@ -646,7 +659,8 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider {
) as _i20.Future<void>);
@override
_i20.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod(
_i20.Future<void> fetchAndSetEquipments(_i3.ExerciseDatabase? database) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetEquipments,
[database],
@@ -755,7 +769,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
);
@override
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
(super.noSuchMethod(
Invocation.method(
#getDefaultHeaders,
[],
@@ -801,7 +816,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
#fetch,
[uri],
),
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i20.Future<Map<String, dynamic>>);
@override
@@ -826,7 +842,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
uri,
],
),
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i20.Future<Map<String, dynamic>>);
@override
@@ -842,7 +859,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
uri,
],
),
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i20.Future<Map<String, dynamic>>);
@override
@@ -874,7 +892,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
/// A class which mocks [WorkoutPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProvider {
class MockWorkoutPlansProvider extends _i1.Mock
implements _i22.WorkoutPlansProvider {
MockWorkoutPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -1011,7 +1030,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<void>);
@override
_i20.Future<_i13.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
_i20.Future<_i13.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetPlanSparse,
[planId],
@@ -1026,7 +1046,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<_i13.WorkoutPlan>);
@override
_i20.Future<_i13.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
_i20.Future<_i13.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
(super.noSuchMethod(
Invocation.method(
#fetchAndSetWorkoutPlanFull,
[workoutId],
@@ -1041,7 +1062,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<_i13.WorkoutPlan>);
@override
_i20.Future<_i13.WorkoutPlan> addWorkout(_i13.WorkoutPlan? workout) => (super.noSuchMethod(
_i20.Future<_i13.WorkoutPlan> addWorkout(_i13.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#addWorkout,
[workout],
@@ -1056,7 +1078,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<_i13.WorkoutPlan>);
@override
_i20.Future<void> editWorkout(_i13.WorkoutPlan? workout) => (super.noSuchMethod(
_i20.Future<void> editWorkout(_i13.WorkoutPlan? workout) =>
(super.noSuchMethod(
Invocation.method(
#editWorkout,
[workout],
@@ -1088,7 +1111,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
base,
],
),
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
returnValue:
_i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i20.Future<Map<String, dynamic>>);
@override
@@ -1208,7 +1232,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<List<_i15.Set>>);
@override
_i20.Future<void> fetchComputedSettings(_i15.Set? workoutSet) => (super.noSuchMethod(
_i20.Future<void> fetchComputedSettings(_i15.Set? workoutSet) =>
(super.noSuchMethod(
Invocation.method(
#fetchComputedSettings,
[workoutSet],
@@ -1253,7 +1278,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<void>);
@override
_i20.Future<_i16.Setting> addSetting(_i16.Setting? workoutSetting) => (super.noSuchMethod(
_i20.Future<_i16.Setting> addSetting(_i16.Setting? workoutSetting) =>
(super.noSuchMethod(
Invocation.method(
#addSetting,
[workoutSetting],
@@ -1277,12 +1303,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv
) as _i20.Future<dynamic>);
@override
_i20.Future<_i17.WorkoutSession> addSession(_i17.WorkoutSession? session) => (super.noSuchMethod(
_i20.Future<_i17.WorkoutSession> addSession(_i17.WorkoutSession? session) =>
(super.noSuchMethod(
Invocation.method(
#addSession,
[session],
),
returnValue: _i20.Future<_i17.WorkoutSession>.value(_FakeWorkoutSession_17(
returnValue:
_i20.Future<_i17.WorkoutSession>.value(_FakeWorkoutSession_17(
this,
Invocation.method(
#addSession,

View File

@@ -36,7 +36,7 @@ final ingredient1 = Ingredient(
protein: 5,
fat: 20,
fatSaturated: 7,
fibers: 12,
fiber: 12,
sodium: 0.5,
);
final ingredient2 = Ingredient(
@@ -50,7 +50,7 @@ final ingredient2 = Ingredient(
protein: 1,
fat: 12,
fatSaturated: 9,
fibers: 50,
fiber: 50,
sodium: 0,
);
final ingredient3 = Ingredient(
@@ -64,7 +64,7 @@ final ingredient3 = Ingredient(
protein: 9,
fat: 10,
fatSaturated: 8,
fibers: 1,
fiber: 1,
sodium: 10,
);
final muesli = Ingredient(
@@ -78,7 +78,7 @@ final muesli = Ingredient(
protein: 5,
fat: 20,
fatSaturated: 7,
fibers: 12,
fiber: 12,
sodium: 0.5,
);
final milk = Ingredient(
@@ -92,7 +92,7 @@ final milk = Ingredient(
protein: 5,
fat: 20,
fatSaturated: 7,
fibers: 12,
fiber: 12,
sodium: 0.5,
);
final apple = Ingredient(
@@ -106,7 +106,7 @@ final apple = Ingredient(
protein: 5,
fat: 20,
fatSaturated: 7,
fibers: 12,
fiber: 12,
sodium: 0.5,
);
final cake = Ingredient(
@@ -120,7 +120,7 @@ final cake = Ingredient(
protein: 4,
fat: 12,
fatSaturated: 0,
fibers: 0,
fiber: 0,
sodium: 0,
);