Powersync seems to be working now

This commit is contained in:
Roland Geider
2025-10-23 15:02:05 +02:00
parent 017cccab18
commit 8b8c4626eb
41 changed files with 653 additions and 1138 deletions

View File

@@ -4,8 +4,6 @@ import 'package:mockito/mockito.dart';
import 'package:provider/provider.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/models/workouts/session.dart';
import 'package:wger/providers/auth.dart';
import 'package:wger/providers/base_provider.dart';
import 'package:wger/providers/body_weight_repository.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/providers/body_weight_state.dart';
@@ -54,8 +52,7 @@ Widget createDashboardScreen({String locale = 'en'}) {
when(mockNutritionProvider.items).thenReturn([getNutritionalPlanScreenshot()]);
// Prepare a BodyWeightState (Riverpod) with screenshot entries
final auth = AuthProvider();
final repo = BodyWeightRepository(WgerBaseProvider(auth));
final repo = BodyWeightRepository();
final bwState = BodyWeightState(repo);
bwState.state = getScreenshotWeightEntries();

View File

@@ -4,8 +4,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart' as riverpod;
import 'package:provider/provider.dart';
import 'package:wger/database/ingredients/ingredients_database.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/providers/auth.dart';
import 'package:wger/providers/base_provider.dart';
import 'package:wger/providers/body_weight_repository.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/providers/body_weight_state.dart';
@@ -29,8 +27,7 @@ Widget createNutritionalPlanScreen({locale = 'en'}) {
);
// Riverpod: prepare BodyWeightState with no entries for this test (or mock via mockBaseProvider)
final auth = AuthProvider();
final repo = BodyWeightRepository(WgerBaseProvider(auth));
final repo = BodyWeightRepository();
final bwState = BodyWeightState(repo);
return riverpod.ProviderScope(

View File

@@ -3,8 +3,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart' as riverpod;
import 'package:mockito/mockito.dart';
import 'package:provider/provider.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/providers/auth.dart';
import 'package:wger/providers/base_provider.dart';
import 'package:wger/providers/body_weight_repository.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/providers/body_weight_state.dart';
@@ -21,8 +19,7 @@ import '../test_data/profile.dart';
Widget createWeightScreen({locale = 'en'}) {
// Build a Riverpod override so tests use the new BodyWeightState
final auth = AuthProvider();
final repo = BodyWeightRepository(WgerBaseProvider(auth));
final repo = BodyWeightRepository();
final bwState = BodyWeightState(repo);
bwState.state = getScreenshotWeightEntries();

View File

@@ -3,8 +3,7 @@
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;
@@ -201,12 +200,8 @@ class ExerciseTable extends DataClass implements Insertable<ExerciseTable> {
return ExerciseTable(
id: data.id.present ? data.id.value : this.id,
data: data.data.present ? data.data.value : this.data,
lastUpdate: data.lastUpdate.present
? data.lastUpdate.value
: this.lastUpdate,
lastFetched: data.lastFetched.present
? data.lastFetched.value
: this.lastFetched,
lastUpdate: data.lastUpdate.present ? data.lastUpdate.value : this.lastUpdate,
lastFetched: data.lastFetched.present ? data.lastFetched.value : this.lastFetched,
);
}
@@ -337,14 +332,13 @@ class $MusclesTable extends Muscles with TableInfo<$MusclesTable, MuscleTable> {
requiredDuringInsert: true,
);
@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
@@ -524,8 +518,7 @@ 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;
@@ -540,14 +533,13 @@ class $EquipmentsTable extends Equipments
requiredDuringInsert: true,
);
@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
@@ -594,8 +586,7 @@ class $EquipmentsTable extends Equipments
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> {
@@ -660,9 +651,7 @@ 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> {
@@ -732,8 +721,7 @@ 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;
@@ -802,8 +790,7 @@ class $CategoriesTable extends Categories
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> {
@@ -868,9 +855,7 @@ 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> {
@@ -940,8 +925,7 @@ 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;
@@ -956,14 +940,13 @@ class $LanguagesTable extends Languages
requiredDuringInsert: true,
);
@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
@@ -1010,8 +993,7 @@ class $LanguagesTable extends Languages
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> {
@@ -1076,9 +1058,7 @@ 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> {
@@ -1168,8 +1148,7 @@ abstract class _$ExerciseDatabase extends GeneratedDatabase {
languages,
];
@override
DriftDatabaseOptions get options =>
const DriftDatabaseOptions(storeDateTimeAsText: true);
DriftDatabaseOptions get options => const DriftDatabaseOptions(storeDateTimeAsText: true);
}
typedef $$ExercisesTableCreateCompanionBuilder =
@@ -1189,8 +1168,7 @@ typedef $$ExercisesTableUpdateCompanionBuilder =
Value<int> rowid,
});
class $$ExercisesTableFilterComposer
extends Composer<_$ExerciseDatabase, $ExercisesTable> {
class $$ExercisesTableFilterComposer extends Composer<_$ExerciseDatabase, $ExercisesTable> {
$$ExercisesTableFilterComposer({
required super.$db,
required super.$table,
@@ -1219,8 +1197,7 @@ class $$ExercisesTableFilterComposer
);
}
class $$ExercisesTableOrderingComposer
extends Composer<_$ExerciseDatabase, $ExercisesTable> {
class $$ExercisesTableOrderingComposer extends Composer<_$ExerciseDatabase, $ExercisesTable> {
$$ExercisesTableOrderingComposer({
required super.$db,
required super.$table,
@@ -1249,8 +1226,7 @@ class $$ExercisesTableOrderingComposer
);
}
class $$ExercisesTableAnnotationComposer
extends Composer<_$ExerciseDatabase, $ExercisesTable> {
class $$ExercisesTableAnnotationComposer extends Composer<_$ExerciseDatabase, $ExercisesTable> {
$$ExercisesTableAnnotationComposer({
required super.$db,
required super.$table,
@@ -1258,8 +1234,7 @@ class $$ExercisesTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get data =>
$composableBuilder(column: $table.data, builder: (column) => column);
@@ -1286,10 +1261,7 @@ class $$ExercisesTableTableManager
$$ExercisesTableAnnotationComposer,
$$ExercisesTableCreateCompanionBuilder,
$$ExercisesTableUpdateCompanionBuilder,
(
ExerciseTable,
BaseReferences<_$ExerciseDatabase, $ExercisesTable, ExerciseTable>,
),
(ExerciseTable, BaseReferences<_$ExerciseDatabase, $ExercisesTable, ExerciseTable>),
ExerciseTable,
PrefetchHooks Function()
> {
@@ -1298,10 +1270,8 @@ class $$ExercisesTableTableManager
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$ExercisesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$ExercisesTableOrderingComposer($db: db, $table: table),
createFilteringComposer: () => $$ExercisesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => $$ExercisesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$ExercisesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
@@ -1332,9 +1302,8 @@ class $$ExercisesTableTableManager
lastFetched: lastFetched,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -1350,10 +1319,7 @@ typedef $$ExercisesTableProcessedTableManager =
$$ExercisesTableAnnotationComposer,
$$ExercisesTableCreateCompanionBuilder,
$$ExercisesTableUpdateCompanionBuilder,
(
ExerciseTable,
BaseReferences<_$ExerciseDatabase, $ExercisesTable, ExerciseTable>,
),
(ExerciseTable, BaseReferences<_$ExerciseDatabase, $ExercisesTable, ExerciseTable>),
ExerciseTable,
PrefetchHooks Function()
>;
@@ -1370,8 +1336,7 @@ typedef $$MusclesTableUpdateCompanionBuilder =
Value<int> rowid,
});
class $$MusclesTableFilterComposer
extends Composer<_$ExerciseDatabase, $MusclesTable> {
class $$MusclesTableFilterComposer extends Composer<_$ExerciseDatabase, $MusclesTable> {
$$MusclesTableFilterComposer({
required super.$db,
required super.$table,
@@ -1384,15 +1349,13 @@ class $$MusclesTableFilterComposer
builder: (column) => ColumnFilters(column),
);
ColumnWithTypeConverterFilters<Muscle, Muscle, String> get data =>
$composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
ColumnWithTypeConverterFilters<Muscle, Muscle, String> get data => $composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
}
class $$MusclesTableOrderingComposer
extends Composer<_$ExerciseDatabase, $MusclesTable> {
class $$MusclesTableOrderingComposer extends Composer<_$ExerciseDatabase, $MusclesTable> {
$$MusclesTableOrderingComposer({
required super.$db,
required super.$table,
@@ -1411,8 +1374,7 @@ class $$MusclesTableOrderingComposer
);
}
class $$MusclesTableAnnotationComposer
extends Composer<_$ExerciseDatabase, $MusclesTable> {
class $$MusclesTableAnnotationComposer extends Composer<_$ExerciseDatabase, $MusclesTable> {
$$MusclesTableAnnotationComposer({
required super.$db,
required super.$table,
@@ -1420,8 +1382,7 @@ class $$MusclesTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumnWithTypeConverter<Muscle, String> get data =>
$composableBuilder(column: $table.data, builder: (column) => column);
@@ -1438,10 +1399,7 @@ class $$MusclesTableTableManager
$$MusclesTableAnnotationComposer,
$$MusclesTableCreateCompanionBuilder,
$$MusclesTableUpdateCompanionBuilder,
(
MuscleTable,
BaseReferences<_$ExerciseDatabase, $MusclesTable, MuscleTable>,
),
(MuscleTable, BaseReferences<_$ExerciseDatabase, $MusclesTable, MuscleTable>),
MuscleTable,
PrefetchHooks Function()
> {
@@ -1450,10 +1408,8 @@ class $$MusclesTableTableManager
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$MusclesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$MusclesTableOrderingComposer($db: db, $table: table),
createFilteringComposer: () => $$MusclesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => $$MusclesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$MusclesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
@@ -1468,9 +1424,8 @@ class $$MusclesTableTableManager
required Muscle data,
Value<int> rowid = const Value.absent(),
}) => MusclesCompanion.insert(id: id, data: data, rowid: rowid),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -1486,10 +1441,7 @@ typedef $$MusclesTableProcessedTableManager =
$$MusclesTableAnnotationComposer,
$$MusclesTableCreateCompanionBuilder,
$$MusclesTableUpdateCompanionBuilder,
(
MuscleTable,
BaseReferences<_$ExerciseDatabase, $MusclesTable, MuscleTable>,
),
(MuscleTable, BaseReferences<_$ExerciseDatabase, $MusclesTable, MuscleTable>),
MuscleTable,
PrefetchHooks Function()
>;
@@ -1506,8 +1458,7 @@ typedef $$EquipmentsTableUpdateCompanionBuilder =
Value<int> rowid,
});
class $$EquipmentsTableFilterComposer
extends Composer<_$ExerciseDatabase, $EquipmentsTable> {
class $$EquipmentsTableFilterComposer extends Composer<_$ExerciseDatabase, $EquipmentsTable> {
$$EquipmentsTableFilterComposer({
required super.$db,
required super.$table,
@@ -1520,15 +1471,13 @@ class $$EquipmentsTableFilterComposer
builder: (column) => ColumnFilters(column),
);
ColumnWithTypeConverterFilters<Equipment, Equipment, String> get data =>
$composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
ColumnWithTypeConverterFilters<Equipment, Equipment, String> get data => $composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
}
class $$EquipmentsTableOrderingComposer
extends Composer<_$ExerciseDatabase, $EquipmentsTable> {
class $$EquipmentsTableOrderingComposer extends Composer<_$ExerciseDatabase, $EquipmentsTable> {
$$EquipmentsTableOrderingComposer({
required super.$db,
required super.$table,
@@ -1547,8 +1496,7 @@ class $$EquipmentsTableOrderingComposer
);
}
class $$EquipmentsTableAnnotationComposer
extends Composer<_$ExerciseDatabase, $EquipmentsTable> {
class $$EquipmentsTableAnnotationComposer extends Composer<_$ExerciseDatabase, $EquipmentsTable> {
$$EquipmentsTableAnnotationComposer({
required super.$db,
required super.$table,
@@ -1556,8 +1504,7 @@ class $$EquipmentsTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumnWithTypeConverter<Equipment, String> get data =>
$composableBuilder(column: $table.data, builder: (column) => column);
@@ -1574,14 +1521,7 @@ class $$EquipmentsTableTableManager
$$EquipmentsTableAnnotationComposer,
$$EquipmentsTableCreateCompanionBuilder,
$$EquipmentsTableUpdateCompanionBuilder,
(
EquipmentTable,
BaseReferences<
_$ExerciseDatabase,
$EquipmentsTable,
EquipmentTable
>,
),
(EquipmentTable, BaseReferences<_$ExerciseDatabase, $EquipmentsTable, EquipmentTable>),
EquipmentTable,
PrefetchHooks Function()
> {
@@ -1590,10 +1530,8 @@ class $$EquipmentsTableTableManager
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$EquipmentsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$EquipmentsTableOrderingComposer($db: db, $table: table),
createFilteringComposer: () => $$EquipmentsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => $$EquipmentsTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$EquipmentsTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
@@ -1607,11 +1545,9 @@ class $$EquipmentsTableTableManager
required int id,
required Equipment data,
Value<int> rowid = const Value.absent(),
}) =>
EquipmentsCompanion.insert(id: id, data: data, rowid: rowid),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
}) => EquipmentsCompanion.insert(id: id, data: data, rowid: rowid),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -1627,10 +1563,7 @@ typedef $$EquipmentsTableProcessedTableManager =
$$EquipmentsTableAnnotationComposer,
$$EquipmentsTableCreateCompanionBuilder,
$$EquipmentsTableUpdateCompanionBuilder,
(
EquipmentTable,
BaseReferences<_$ExerciseDatabase, $EquipmentsTable, EquipmentTable>,
),
(EquipmentTable, BaseReferences<_$ExerciseDatabase, $EquipmentsTable, EquipmentTable>),
EquipmentTable,
PrefetchHooks Function()
>;
@@ -1647,8 +1580,7 @@ typedef $$CategoriesTableUpdateCompanionBuilder =
Value<int> rowid,
});
class $$CategoriesTableFilterComposer
extends Composer<_$ExerciseDatabase, $CategoriesTable> {
class $$CategoriesTableFilterComposer extends Composer<_$ExerciseDatabase, $CategoriesTable> {
$$CategoriesTableFilterComposer({
required super.$db,
required super.$table,
@@ -1661,15 +1593,14 @@ class $$CategoriesTableFilterComposer
builder: (column) => ColumnFilters(column),
);
ColumnWithTypeConverterFilters<ExerciseCategory, ExerciseCategory, String>
get data => $composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
ColumnWithTypeConverterFilters<ExerciseCategory, ExerciseCategory, String> get data =>
$composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
}
class $$CategoriesTableOrderingComposer
extends Composer<_$ExerciseDatabase, $CategoriesTable> {
class $$CategoriesTableOrderingComposer extends Composer<_$ExerciseDatabase, $CategoriesTable> {
$$CategoriesTableOrderingComposer({
required super.$db,
required super.$table,
@@ -1688,8 +1619,7 @@ class $$CategoriesTableOrderingComposer
);
}
class $$CategoriesTableAnnotationComposer
extends Composer<_$ExerciseDatabase, $CategoriesTable> {
class $$CategoriesTableAnnotationComposer extends Composer<_$ExerciseDatabase, $CategoriesTable> {
$$CategoriesTableAnnotationComposer({
required super.$db,
required super.$table,
@@ -1697,8 +1627,7 @@ class $$CategoriesTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumnWithTypeConverter<ExerciseCategory, String> get data =>
$composableBuilder(column: $table.data, builder: (column) => column);
@@ -1715,10 +1644,7 @@ class $$CategoriesTableTableManager
$$CategoriesTableAnnotationComposer,
$$CategoriesTableCreateCompanionBuilder,
$$CategoriesTableUpdateCompanionBuilder,
(
CategoryTable,
BaseReferences<_$ExerciseDatabase, $CategoriesTable, CategoryTable>,
),
(CategoryTable, BaseReferences<_$ExerciseDatabase, $CategoriesTable, CategoryTable>),
CategoryTable,
PrefetchHooks Function()
> {
@@ -1727,10 +1653,8 @@ class $$CategoriesTableTableManager
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CategoriesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CategoriesTableOrderingComposer($db: db, $table: table),
createFilteringComposer: () => $$CategoriesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => $$CategoriesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$CategoriesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
@@ -1744,11 +1668,9 @@ class $$CategoriesTableTableManager
required int id,
required ExerciseCategory data,
Value<int> rowid = const Value.absent(),
}) =>
CategoriesCompanion.insert(id: id, data: data, rowid: rowid),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
}) => CategoriesCompanion.insert(id: id, data: data, rowid: rowid),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -1764,10 +1686,7 @@ typedef $$CategoriesTableProcessedTableManager =
$$CategoriesTableAnnotationComposer,
$$CategoriesTableCreateCompanionBuilder,
$$CategoriesTableUpdateCompanionBuilder,
(
CategoryTable,
BaseReferences<_$ExerciseDatabase, $CategoriesTable, CategoryTable>,
),
(CategoryTable, BaseReferences<_$ExerciseDatabase, $CategoriesTable, CategoryTable>),
CategoryTable,
PrefetchHooks Function()
>;
@@ -1784,8 +1703,7 @@ typedef $$LanguagesTableUpdateCompanionBuilder =
Value<int> rowid,
});
class $$LanguagesTableFilterComposer
extends Composer<_$ExerciseDatabase, $LanguagesTable> {
class $$LanguagesTableFilterComposer extends Composer<_$ExerciseDatabase, $LanguagesTable> {
$$LanguagesTableFilterComposer({
required super.$db,
required super.$table,
@@ -1798,15 +1716,13 @@ class $$LanguagesTableFilterComposer
builder: (column) => ColumnFilters(column),
);
ColumnWithTypeConverterFilters<Language, Language, String> get data =>
$composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
ColumnWithTypeConverterFilters<Language, Language, String> get data => $composableBuilder(
column: $table.data,
builder: (column) => ColumnWithTypeConverterFilters(column),
);
}
class $$LanguagesTableOrderingComposer
extends Composer<_$ExerciseDatabase, $LanguagesTable> {
class $$LanguagesTableOrderingComposer extends Composer<_$ExerciseDatabase, $LanguagesTable> {
$$LanguagesTableOrderingComposer({
required super.$db,
required super.$table,
@@ -1825,8 +1741,7 @@ class $$LanguagesTableOrderingComposer
);
}
class $$LanguagesTableAnnotationComposer
extends Composer<_$ExerciseDatabase, $LanguagesTable> {
class $$LanguagesTableAnnotationComposer extends Composer<_$ExerciseDatabase, $LanguagesTable> {
$$LanguagesTableAnnotationComposer({
required super.$db,
required super.$table,
@@ -1834,8 +1749,7 @@ class $$LanguagesTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumnWithTypeConverter<Language, String> get data =>
$composableBuilder(column: $table.data, builder: (column) => column);
@@ -1852,10 +1766,7 @@ class $$LanguagesTableTableManager
$$LanguagesTableAnnotationComposer,
$$LanguagesTableCreateCompanionBuilder,
$$LanguagesTableUpdateCompanionBuilder,
(
LanguagesTable,
BaseReferences<_$ExerciseDatabase, $LanguagesTable, LanguagesTable>,
),
(LanguagesTable, BaseReferences<_$ExerciseDatabase, $LanguagesTable, LanguagesTable>),
LanguagesTable,
PrefetchHooks Function()
> {
@@ -1864,10 +1775,8 @@ class $$LanguagesTableTableManager
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$LanguagesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$LanguagesTableOrderingComposer($db: db, $table: table),
createFilteringComposer: () => $$LanguagesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => $$LanguagesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$LanguagesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
@@ -1882,9 +1791,8 @@ class $$LanguagesTableTableManager
required Language data,
Value<int> rowid = const Value.absent(),
}) => LanguagesCompanion.insert(id: id, data: data, rowid: rowid),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -1900,10 +1808,7 @@ typedef $$LanguagesTableProcessedTableManager =
$$LanguagesTableAnnotationComposer,
$$LanguagesTableCreateCompanionBuilder,
$$LanguagesTableUpdateCompanionBuilder,
(
LanguagesTable,
BaseReferences<_$ExerciseDatabase, $LanguagesTable, LanguagesTable>,
),
(LanguagesTable, BaseReferences<_$ExerciseDatabase, $LanguagesTable, LanguagesTable>),
LanguagesTable,
PrefetchHooks Function()
>;
@@ -1911,14 +1816,11 @@ typedef $$LanguagesTableProcessedTableManager =
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,8 +3,7 @@
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;
@@ -155,19 +154,16 @@ class IngredientTable extends DataClass implements Insertable<IngredientTable> {
};
}
IngredientTable copyWith({int? id, String? data, DateTime? lastFetched}) =>
IngredientTable(
id: id ?? this.id,
data: data ?? this.data,
lastFetched: lastFetched ?? this.lastFetched,
);
IngredientTable copyWith({int? id, String? data, DateTime? lastFetched}) => IngredientTable(
id: id ?? this.id,
data: data ?? this.data,
lastFetched: lastFetched ?? this.lastFetched,
);
IngredientTable copyWithCompanion(IngredientsCompanion data) {
return IngredientTable(
id: data.id.present ? data.id.value : this.id,
data: data.data.present ? data.data.value : this.data,
lastFetched: data.lastFetched.present
? data.lastFetched.value
: this.lastFetched,
lastFetched: data.lastFetched.present ? data.lastFetched.value : this.lastFetched,
);
}
@@ -279,8 +275,7 @@ abstract class _$IngredientDatabase extends GeneratedDatabase {
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [ingredients];
@override
DriftDatabaseOptions get options =>
const DriftDatabaseOptions(storeDateTimeAsText: true);
DriftDatabaseOptions get options => const DriftDatabaseOptions(storeDateTimeAsText: true);
}
typedef $$IngredientsTableCreateCompanionBuilder =
@@ -298,8 +293,7 @@ typedef $$IngredientsTableUpdateCompanionBuilder =
Value<int> rowid,
});
class $$IngredientsTableFilterComposer
extends Composer<_$IngredientDatabase, $IngredientsTable> {
class $$IngredientsTableFilterComposer extends Composer<_$IngredientDatabase, $IngredientsTable> {
$$IngredientsTableFilterComposer({
required super.$db,
required super.$table,
@@ -323,8 +317,7 @@ class $$IngredientsTableFilterComposer
);
}
class $$IngredientsTableOrderingComposer
extends Composer<_$IngredientDatabase, $IngredientsTable> {
class $$IngredientsTableOrderingComposer extends Composer<_$IngredientDatabase, $IngredientsTable> {
$$IngredientsTableOrderingComposer({
required super.$db,
required super.$table,
@@ -357,8 +350,7 @@ class $$IngredientsTableAnnotationComposer
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get data =>
$composableBuilder(column: $table.data, builder: (column) => column);
@@ -382,11 +374,7 @@ class $$IngredientsTableTableManager
$$IngredientsTableUpdateCompanionBuilder,
(
IngredientTable,
BaseReferences<
_$IngredientDatabase,
$IngredientsTable,
IngredientTable
>,
BaseReferences<_$IngredientDatabase, $IngredientsTable, IngredientTable>,
),
IngredientTable,
PrefetchHooks Function()
@@ -398,10 +386,8 @@ class $$IngredientsTableTableManager
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$IngredientsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$IngredientsTableOrderingComposer($db: db, $table: table),
createFilteringComposer: () => $$IngredientsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => $$IngredientsTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$IngredientsTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
@@ -428,9 +414,8 @@ class $$IngredientsTableTableManager
lastFetched: lastFetched,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -446,14 +431,7 @@ typedef $$IngredientsTableProcessedTableManager =
$$IngredientsTableAnnotationComposer,
$$IngredientsTableCreateCompanionBuilder,
$$IngredientsTableUpdateCompanionBuilder,
(
IngredientTable,
BaseReferences<
_$IngredientDatabase,
$IngredientsTable,
IngredientTable
>,
),
(IngredientTable, BaseReferences<_$IngredientDatabase, $IngredientsTable, IngredientTable>),
IngredientTable,
PrefetchHooks Function()
>;

View File

@@ -15,8 +15,8 @@ part 'database.g.dart';
],
//include: {'queries.drift'},
)
class AppDatabase extends _$AppDatabase {
AppDatabase(super.e);
class DriftPowersyncDatabase extends _$DriftPowersyncDatabase {
DriftPowersyncDatabase(super.e);
@override
int get schemaVersion => 1;
@@ -42,7 +42,7 @@ class AppDatabase extends _$AppDatabase {
}
final driftPowerSyncDatabase = Provider((ref) {
return AppDatabase(
return DriftPowersyncDatabase(
DatabaseConnection.delayed(
Future(() async {
final database = await ref.read(powerSyncInstanceProvider.future);

View File

@@ -173,9 +173,9 @@ class WeightEntryTableCompanion extends UpdateCompanion<WeightEntry> {
}
}
abstract class _$AppDatabase extends GeneratedDatabase {
_$AppDatabase(QueryExecutor e) : super(e);
$AppDatabaseManager get managers => $AppDatabaseManager(this);
abstract class _$DriftPowersyncDatabase extends GeneratedDatabase {
_$DriftPowersyncDatabase(QueryExecutor e) : super(e);
$DriftPowersyncDatabaseManager get managers => $DriftPowersyncDatabaseManager(this);
late final $WeightEntryTableTable weightEntryTable = $WeightEntryTableTable(
this,
);
@@ -185,8 +185,7 @@ abstract class _$AppDatabase extends GeneratedDatabase {
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [weightEntryTable];
@override
DriftDatabaseOptions get options =>
const DriftDatabaseOptions(storeDateTimeAsText: true);
DriftDatabaseOptions get options => const DriftDatabaseOptions(storeDateTimeAsText: true);
}
typedef $$WeightEntryTableTableCreateCompanionBuilder =
@@ -205,7 +204,7 @@ typedef $$WeightEntryTableTableUpdateCompanionBuilder =
});
class $$WeightEntryTableTableFilterComposer
extends Composer<_$AppDatabase, $WeightEntryTableTable> {
extends Composer<_$DriftPowersyncDatabase, $WeightEntryTableTable> {
$$WeightEntryTableTableFilterComposer({
required super.$db,
required super.$table,
@@ -230,7 +229,7 @@ class $$WeightEntryTableTableFilterComposer
}
class $$WeightEntryTableTableOrderingComposer
extends Composer<_$AppDatabase, $WeightEntryTableTable> {
extends Composer<_$DriftPowersyncDatabase, $WeightEntryTableTable> {
$$WeightEntryTableTableOrderingComposer({
required super.$db,
required super.$table,
@@ -255,7 +254,7 @@ class $$WeightEntryTableTableOrderingComposer
}
class $$WeightEntryTableTableAnnotationComposer
extends Composer<_$AppDatabase, $WeightEntryTableTable> {
extends Composer<_$DriftPowersyncDatabase, $WeightEntryTableTable> {
$$WeightEntryTableTableAnnotationComposer({
required super.$db,
required super.$table,
@@ -276,7 +275,7 @@ class $$WeightEntryTableTableAnnotationComposer
class $$WeightEntryTableTableTableManager
extends
RootTableManager<
_$AppDatabase,
_$DriftPowersyncDatabase,
$WeightEntryTableTable,
WeightEntry,
$$WeightEntryTableTableFilterComposer,
@@ -286,13 +285,13 @@ class $$WeightEntryTableTableTableManager
$$WeightEntryTableTableUpdateCompanionBuilder,
(
WeightEntry,
BaseReferences<_$AppDatabase, $WeightEntryTableTable, WeightEntry>,
BaseReferences<_$DriftPowersyncDatabase, $WeightEntryTableTable, WeightEntry>,
),
WeightEntry,
PrefetchHooks Function()
> {
$$WeightEntryTableTableTableManager(
_$AppDatabase db,
_$DriftPowersyncDatabase db,
$WeightEntryTableTable table,
) : super(
TableManagerState(
@@ -328,9 +327,8 @@ class $$WeightEntryTableTableTableManager
date: date,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
withReferenceMapper: (p0) =>
p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(),
prefetchHooksCallback: null,
),
);
@@ -338,7 +336,7 @@ class $$WeightEntryTableTableTableManager
typedef $$WeightEntryTableTableProcessedTableManager =
ProcessedTableManager<
_$AppDatabase,
_$DriftPowersyncDatabase,
$WeightEntryTableTable,
WeightEntry,
$$WeightEntryTableTableFilterComposer,
@@ -346,17 +344,14 @@ typedef $$WeightEntryTableTableProcessedTableManager =
$$WeightEntryTableTableAnnotationComposer,
$$WeightEntryTableTableCreateCompanionBuilder,
$$WeightEntryTableTableUpdateCompanionBuilder,
(
WeightEntry,
BaseReferences<_$AppDatabase, $WeightEntryTableTable, WeightEntry>,
),
(WeightEntry, BaseReferences<_$DriftPowersyncDatabase, $WeightEntryTableTable, WeightEntry>),
WeightEntry,
PrefetchHooks Function()
>;
class $AppDatabaseManager {
final _$AppDatabase _db;
$AppDatabaseManager(this._db);
class $DriftPowersyncDatabaseManager {
final _$DriftPowersyncDatabase _db;
$DriftPowersyncDatabaseManager(this._db);
$$WeightEntryTableTableTableManager get weightEntryTable =>
$$WeightEntryTableTableTableManager(_db, _db.weightEntryTable);
}

View File

@@ -62,19 +62,21 @@ class DjangoConnector extends PowerSyncBackendConnector {
'data': {'id': op.id, ...?op.opData},
};
logger.fine('Uploading record', record);
logger.fine('Uploading record $record');
logger.fine(op.clientId);
logger.fine(op.metadata);
switch (op.op) {
case UpdateType.put:
logger.fine('Upserting record', record);
logger.fine('Upserting record');
await apiClient.upsert(record);
break;
case UpdateType.patch:
logger.fine('Patching record', record);
logger.fine('Patching record');
await apiClient.update(record);
break;
case UpdateType.delete:
logger.fine('Deleting record', record);
logger.fine('Deleting record');
await apiClient.delete(record);
break;
}

View File

@@ -6,6 +6,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:wger/models/body_weight/weight_entry.dart';
import '../database/powersync/database.dart';
import 'body_weight_riverpod.dart';
part 'body_weight_powersync.g.dart';
@@ -16,27 +17,32 @@ final class WeightEntryNotifier extends _$WeightEntryNotifier {
@override
Stream<List<WeightEntry>> build() {
final database = ref.watch(driftPowerSyncDatabase);
final query = database.select(database.weightEntryTable)
..orderBy([(t) => OrderingTerm(expression: t.date)]);
return query.watch();
final repo = ref.watch(bodyWeightRepositoryProvider);
return repo.watchAllDrift(database);
}
Future<void> deleteEntry(String id) async {
final db = ref.read(driftPowerSyncDatabase);
await (db.delete(db.weightEntryTable)..where((t) => t.id.equals(id))).go();
final repo = ref.read(bodyWeightRepositoryProvider);
await repo.deleteLocalDrift(db, id);
}
Future<void> updateEntry(WeightEntry entry) async {
final db = ref.read(driftPowerSyncDatabase);
final repo = ref.read(bodyWeightRepositoryProvider);
await repo.updateLocalDrift(db, entry);
}
final stmt = db.update(db.weightEntryTable)..where((t) => t.id.equals(entry.id!));
await stmt.write(
WeightEntryTableCompanion(
date: Value(entry.date),
weight: Value(entry.weight as double),
),
);
Future<void> addEntry(WeightEntry entry) async {
final db = ref.read(driftPowerSyncDatabase);
_log.info('Adding new weight entry on local drift: ${entry.date} - ${entry.weight}');
await db
.into(db.weightEntryTable)
.insertReturning(
WeightEntryTableCompanion.insert(
date: Value(entry.date),
weight: entry.weight as double,
),
);
}
}

View File

@@ -33,18 +33,15 @@ final class WeightEntryNotifierProvider
WeightEntryNotifier create() => WeightEntryNotifier();
}
String _$weightEntryNotifierHash() =>
r'e1ebd97614bf12e7fd64c4613a13b082cb01eb33';
String _$weightEntryNotifierHash() => r'df37b137d038b82b0937333a4f1cc3be7148f932';
abstract class _$WeightEntryNotifier
extends $StreamNotifier<List<WeightEntry>> {
abstract class _$WeightEntryNotifier extends $StreamNotifier<List<WeightEntry>> {
Stream<List<WeightEntry>> build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref =
this.ref as $Ref<AsyncValue<List<WeightEntry>>, List<WeightEntry>>;
final ref = this.ref as $Ref<AsyncValue<List<WeightEntry>>, List<WeightEntry>>;
final element =
ref.element
as $ClassProviderElement<

View File

@@ -2,80 +2,37 @@
* Repository for body weight network operations.
*/
import 'package:drift/drift.dart';
import 'package:logging/logging.dart';
import 'package:powersync/powersync.dart';
import 'package:wger/models/body_weight/weight_entry.dart';
import 'package:wger/powersync.dart' as ps;
import 'package:wger/powersync/schema.dart';
import '../database/powersync/database.dart';
class BodyWeightRepository {
final _logger = Logger('BodyWeightRepository');
static const BODY_WEIGHT_URL = 'weightentry';
BodyWeightRepository();
/// Fetches all weight entries (paginated on the server side)
Future<List<WeightEntry>> fetchAll() async {
_logger.info('Repository: fetching all body weight entries');
// final data = await baseProvider.fetchPaginated(
// baseProvider.makeUrl(
// BODY_WEIGHT_URL,
// query: {'ordering': '-date', 'limit': API_MAX_PAGE_SIZE},
// ),
// );
final out = <WeightEntry>[];
// for (final entry in data) {
// out.add(WeightEntry.fromJson(entry));
// }
return out;
Stream<List<WeightEntry>> watchAllDrift(DriftPowersyncDatabase db) {
_logger.finer('Watching all local weight entries');
final query = db.select(db.weightEntryTable)
..orderBy([(t) => OrderingTerm(expression: t.date, mode: OrderingMode.desc)]);
return query.watch();
}
/// Creates a new weight entry on the server and returns the created object
Future<WeightEntry> create(WeightEntry entry) async {
_logger.info('Repository: creating weight entry');
final result = await ps.db.execute(
'INSERT INTO $tableBodyWeight (id, weight, date) VALUES (?, ?, ?)',
[
uuid.v4(),
entry.weight,
entry.date.toIso8601String(),
],
);
_logger.fine('result of insert: $result');
return WeightEntry();
return WeightEntry.fromRow(result.first);
Future<void> deleteLocalDrift(DriftPowersyncDatabase db, String id) async {
_logger.finer('Deleting local weight entry $id');
await (db.delete(db.weightEntryTable)..where((t) => t.id.equals(id))).go();
}
/// Updates an existing weight entry on the server
Future<WeightEntry> update(WeightEntry entry) async {
_logger.info('Repository: updating weight entry ${entry.id}');
final result = await ps.db.execute(
'UPDATE $tableBodyWeight SET weight = ?, date = ? WHERE id = ?',
[
entry.weight,
entry.date.toIso8601String(),
entry.id,
],
);
_logger.fine('result of update: $result');
return WeightEntry();
return WeightEntry.fromRow(result.first);
}
/// Deletes a weight entry on the server
Future<void> delete(String id) async {
_logger.info('Repository: deleting weight entry $id');
await ps.db.execute(
'DELETE FROM $tableBodyWeight WHERE id = ?',
[id],
Future<void> updateLocalDrift(DriftPowersyncDatabase db, WeightEntry entry) async {
_logger.finer('Updating local weight entry ${entry.id}');
final stmt = db.update(db.weightEntryTable)..where((t) => t.id.equals(entry.id!));
await stmt.write(
WeightEntryTableCompanion(
date: Value(entry.date),
weight: Value(entry.weight as double),
),
);
}
}

View File

@@ -1,5 +1,3 @@
import 'dart:async';
import 'package:logging/logging.dart';
import 'package:state_notifier/state_notifier.dart';
import 'package:wger/models/body_weight/weight_entry.dart';
@@ -15,7 +13,7 @@ class BodyWeightState extends StateNotifier<List<WeightEntry>> {
WeightEntry? getNewestEntry() => state.isNotEmpty ? state.first : null;
WeightEntry? findById(int id) {
WeightEntry? findById(String id) {
try {
return state.firstWhere((e) => e.id == id);
} on StateError {
@@ -32,48 +30,4 @@ class BodyWeightState extends StateNotifier<List<WeightEntry>> {
}
void clear() => state = [];
Future<void> fetchAndSetEntries() async {
_logger.info('State: fetching entries');
final entries = await repository.fetchAll();
// Ensure sorted by date desc
entries.sort((a, b) => b.date.compareTo(a.date));
state = entries;
}
Future<WeightEntry> addEntry(WeightEntry entry) async {
final created = await repository.create(entry);
final newList = [...state, created];
newList.sort((a, b) => b.date.compareTo(a.date));
state = newList;
return created;
}
Future<WeightEntry> editEntry(WeightEntry entry) async {
return repository.update(entry);
}
Future<void> deleteEntry(String id) async {
final idx = state.indexWhere((e) => e.id == id);
if (idx < 0) {
return;
}
final removed = state[idx];
final newList = [...state]..removeAt(idx);
state = newList;
try {
final response = await repository.delete(id);
// if (response.statusCode >= 400) {
// // Revert
// state = [...state]..insert(idx, removed);
// throw Exception('Failed to delete: ${response.statusCode}');
// }
} catch (e) {
// Revert on any error and rethrow
state = [...state]..insert(idx, removed);
rethrow;
}
}
}

View File

@@ -21,10 +21,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/providers/body_weight_powersync.dart';
import 'package:wger/providers/user.dart';
import 'package:wger/screens/form_screen.dart';
import 'package:wger/screens/weight_screen.dart';
import 'package:wger/widgets/core/progress_indicator.dart';
import 'package:wger/widgets/dashboard/widgets/nothing_found.dart';
import 'package:wger/widgets/measurements/charts.dart';
import 'package:wger/widgets/measurements/helpers.dart';
@@ -36,11 +37,11 @@ class DashboardWeightWidget extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final profile = context.read<UserProvider>().profile;
final entriesList = ref.watch(bodyWeightStateProvider);
final entriesList = ref.watch(weightEntryProvider);
final (entriesAll, entries7dAvg) = sensibleRange(
entriesList.map((e) => MeasurementChartEntry(e.weight, e.date)).toList(),
);
// final (entriesAll, entries7dAvg) = sensibleRange(
// entriesList.map((e) => MeasurementChartEntry(e.weight, e.date)).toList(),
// );
return Card(
child: Column(
@@ -56,62 +57,81 @@ class DashboardWeightWidget extends ConsumerWidget {
color: Theme.of(context).textTheme.headlineSmall!.color,
),
),
Column(
children: [
if (entriesList.isNotEmpty)
Column(
children: [
SizedBox(
height: 200,
child: MeasurementChartWidgetFl(
entriesAll,
weightUnit(profile!.isMetric, context),
avgs: entries7dAvg,
),
),
if (entries7dAvg.isNotEmpty)
MeasurementOverallChangeWidget(
entries7dAvg.first,
entries7dAvg.last,
weightUnit(profile.isMetric, context),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
entriesList.when(
data: (entriesList) {
final (entriesAll, entries7dAvg) = sensibleRange(
entriesList.map((e) => MeasurementChartEntry(e.weight, e.date)).toList(),
);
return Column(
children: [
if (entriesList.isNotEmpty)
Column(
children: [
TextButton(
child: Text(
AppLocalizations.of(context).goToDetailPage,
SizedBox(
height: 200,
child: MeasurementChartWidgetFl(
entriesAll,
weightUnit(profile!.isMetric, context),
avgs: entries7dAvg,
),
onPressed: () {
Navigator.of(context).pushNamed(WeightScreen.routeName);
},
),
IconButton(
icon: const Icon(Icons.add),
onPressed: () {
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).newEntry,
WeightForm(
entriesList.first.copyWith(id: null, date: DateTime.now()),
),
if (entries7dAvg.isNotEmpty)
MeasurementOverallChangeWidget(
entries7dAvg.first,
entries7dAvg.last,
weightUnit(profile.isMetric, context),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
child: Text(
AppLocalizations.of(context).goToDetailPage,
),
);
},
onPressed: () {
Navigator.of(context).pushNamed(WeightScreen.routeName);
},
),
IconButton(
icon: const Icon(Icons.add),
onPressed: () {
Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).newEntry,
WeightForm(
entriesList.first.copyWith(id: null, date: DateTime.now()),
),
),
);
},
),
],
),
],
)
else
NothingFound(
AppLocalizations.of(context).noWeightEntries,
AppLocalizations.of(context).newEntry,
WeightForm(),
),
],
)
else
NothingFound(
AppLocalizations.of(context).noWeightEntries,
AppLocalizations.of(context).newEntry,
WeightForm(),
),
],
],
);
},
loading: () => const BoxedProgressIndicator(),
error: (err, st) {
return Column(
children: [
Text('Error loading local weights: $err'),
Text(st.toString()),
const SizedBox(height: 200, child: Center(child: Icon(Icons.error))),
],
);
},
),
],
),

View File

@@ -19,11 +19,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart' as riverpod;
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/models/body_weight/weight_entry.dart';
import 'package:wger/models/nutrition/nutritional_plan.dart';
import 'package:wger/providers/auth.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/widgets/nutrition/charts.dart';
import 'package:wger/widgets/nutrition/macro_nutrients_table.dart';
@@ -38,7 +36,6 @@ class NutritionalPlanDetailWidget extends riverpod.ConsumerWidget {
@override
Widget build(BuildContext context, riverpod.WidgetRef ref) {
final nutritionalGoals = _nutritionalPlan.nutritionalGoals;
final auth = context.read<AuthProvider>();
final entriesList = ref.watch(bodyWeightStateProvider);
final WeightEntry? lastWeightEntry = entriesList.isNotEmpty ? entriesList.first : null;
final nutritionalGoalsGperKg = lastWeightEntry != null

View File

@@ -23,7 +23,7 @@ import 'package:intl/intl.dart';
import 'package:wger/helpers/consts.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/models/body_weight/weight_entry.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/providers/body_weight_powersync.dart';
class WeightForm extends riverpod.ConsumerWidget {
final _form = GlobalKey<FormState>();
@@ -197,7 +197,6 @@ class WeightForm extends riverpod.ConsumerWidget {
return null;
},
),
Text("ID: ${_weightEntry.id}"),
ElevatedButton(
key: const Key(SUBMIT_BUTTON_KEY_NAME),
child: Text(AppLocalizations.of(context).save),
@@ -210,10 +209,10 @@ class WeightForm extends riverpod.ConsumerWidget {
_form.currentState!.save();
// Save the entry on the server
final notifier = ref.read(bodyWeightStateProvider.notifier);
final notifier = ref.read(weightEntryProvider.notifier);
_weightEntry.id == null
? await notifier.addEntry(_weightEntry)
: await notifier.editEntry(_weightEntry);
: await notifier.updateEntry(_weightEntry);
if (context.mounted) {
Navigator.of(context).pop();

View File

@@ -22,10 +22,10 @@ import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
import 'package:wger/providers/body_weight_powersync.dart';
import 'package:wger/providers/body_weight_riverpod.dart';
import 'package:wger/providers/nutrition.dart';
import 'package:wger/providers/user.dart';
import 'package:wger/screens/form_screen.dart';
import 'package:wger/widgets/core/progress_indicator.dart';
import 'package:wger/widgets/measurements/charts.dart';
import 'package:wger/widgets/measurements/helpers.dart';
import 'package:wger/widgets/weight/forms.dart';
@@ -40,9 +40,6 @@ class WeightOverview extends riverpod.ConsumerWidget {
final plans = context.read<NutritionPlansProvider>().items;
final entries = ref.watch(weightEntryProvider);
// final entriesAsync = ref.watch(bodyWeightStreamProvider);
// Handle stream states (loading/error/data) and reuse the existing UI
return entries.when(
data: (entriesList) {
final entriesAll = entriesList.map((e) => MeasurementChartEntry(e.weight, e.date)).toList();
@@ -75,78 +72,67 @@ class WeightOverview extends riverpod.ConsumerWidget {
),
SizedBox(
height: 300,
child: RefreshIndicator(
onRefresh: () => ref.read(bodyWeightStateProvider.notifier).fetchAndSetEntries(),
child: ListView.builder(
padding: const EdgeInsets.all(10.0),
itemCount: entriesList.length,
itemBuilder: (context, index) {
final currentEntry = entriesList[index];
return Card(
child: ListTile(
title: Text(
'${numberFormat.format(currentEntry.weight)} ${weightUnit(profile.isMetric, context)}',
),
subtitle: Text(
DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).add_Hm().format(currentEntry.date),
),
trailing: PopupMenuButton(
itemBuilder: (BuildContext context) {
return [
PopupMenuItem(
child: Text(AppLocalizations.of(context).edit),
onTap: () => Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).edit,
WeightForm(currentEntry),
),
child: ListView.builder(
padding: const EdgeInsets.all(10.0),
itemCount: entriesList.length,
itemBuilder: (context, index) {
final currentEntry = entriesList[index];
return Card(
child: ListTile(
title: Text(
'${numberFormat.format(currentEntry.weight)} ${weightUnit(profile.isMetric, context)}',
),
subtitle: Text(
DateFormat.yMd(
Localizations.localeOf(context).languageCode,
).add_Hm().format(currentEntry.date),
),
trailing: PopupMenuButton(
itemBuilder: (BuildContext context) {
return [
PopupMenuItem(
child: Text(AppLocalizations.of(context).edit),
onTap: () => Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).edit,
WeightForm(currentEntry),
),
),
PopupMenuItem(
child: Text(AppLocalizations.of(context).delete),
onTap: () async {
// Delete entry from DB
await ref
.read(bodyWeightStateProvider.notifier)
.deleteEntry(currentEntry.id!);
),
PopupMenuItem(
child: Text(AppLocalizations.of(context).delete),
onTap: () async {
await ref
.read(weightEntryProvider.notifier)
.deleteEntry(currentEntry.id!);
// and inform the user
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
AppLocalizations.of(context).successfullyDeleted,
textAlign: TextAlign.center,
),
// and inform the user
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
AppLocalizations.of(context).successfullyDeleted,
textAlign: TextAlign.center,
),
);
}
},
),
];
},
),
),
);
}
},
),
];
},
),
);
},
),
),
);
},
),
),
],
);
},
loading: () {
// Show a small loading indicator while waiting for the first data set
return const Column(
children: [
SizedBox(height: 200, child: Center(child: CircularProgressIndicator())),
],
);
},
loading: () => const BoxedProgressIndicator(),
error: (err, st) {
return Column(
children: [

View File

@@ -26,12 +26,10 @@ import 'package:mockito/src/dummies.dart' as _i5;
// ignore_for_file: subtype_of_sealed_class
class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
_FakeResponse_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeStreamedResponse_1 extends _i1.SmartFake
implements _i2.StreamedResponse {
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
_FakeStreamedResponse_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}

View File

@@ -42,73 +42,60 @@ import 'package:wger/providers/user.dart' as _i21;
// 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)
: super(parent, parentInvocation);
}
class _FakeExerciseDatabase_1 extends _i1.SmartFake
implements _i3.ExerciseDatabase {
class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase {
_FakeExerciseDatabase_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise {
_FakeExercise_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeExercise_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeExerciseCategory_3 extends _i1.SmartFake
implements _i5.ExerciseCategory {
class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory {
_FakeExerciseCategory_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeEquipment_4 extends _i1.SmartFake implements _i6.Equipment {
_FakeEquipment_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeEquipment_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMuscle_5 extends _i1.SmartFake implements _i7.Muscle {
_FakeMuscle_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMuscle_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language {
_FakeLanguage_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLanguage_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeIngredientDatabase_7 extends _i1.SmartFake
implements _i9.IngredientDatabase {
class _FakeIngredientDatabase_7 extends _i1.SmartFake implements _i9.IngredientDatabase {
_FakeIngredientDatabase_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeNutritionalPlan_8 extends _i1.SmartFake
implements _i10.NutritionalPlan {
class _FakeNutritionalPlan_8 extends _i1.SmartFake implements _i10.NutritionalPlan {
_FakeNutritionalPlan_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeMeal_9 extends _i1.SmartFake implements _i11.Meal {
_FakeMeal_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMeal_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMealItem_10 extends _i1.SmartFake implements _i12.MealItem {
_FakeMealItem_10(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMealItem_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeIngredient_11 extends _i1.SmartFake implements _i13.Ingredient {
_FakeIngredient_11(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeIngredient_11(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSharedPreferencesAsync_12 extends _i1.SmartFake
implements _i14.SharedPreferencesAsync {
class _FakeSharedPreferencesAsync_12 extends _i1.SmartFake implements _i14.SharedPreferencesAsync {
_FakeSharedPreferencesAsync_12(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
@@ -119,18 +106,15 @@ class _FakeAuthProvider_13 extends _i1.SmartFake implements _i15.AuthProvider {
}
class _FakeClient_14 extends _i1.SmartFake implements _i16.Client {
_FakeClient_14(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_14(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_15 extends _i1.SmartFake implements Uri {
_FakeUri_15(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_15(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_16 extends _i1.SmartFake implements _i16.Response {
_FakeResponse_16(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_16(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [ExercisesProvider].
@@ -232,11 +216,10 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
);
@override
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
@override
set languages(List<_i8.Language>? languages) => super.noSuchMethod(
@@ -246,8 +229,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i18.Future<void> setFilters(_i17.Filters? newFilters) =>
@@ -560,8 +542,7 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider {
/// A class which mocks [NutritionPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockNutritionPlansProvider extends _i1.Mock
implements _i20.NutritionPlansProvider {
class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlansProvider {
MockNutritionPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -618,8 +599,7 @@ class MockNutritionPlansProvider extends _i1.Mock
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(
@@ -640,8 +620,7 @@ class MockNutritionPlansProvider extends _i1.Mock
@override
_i11.Meal? findMealById(int? id) =>
(super.noSuchMethod(Invocation.method(#findMealById, [id]))
as _i11.Meal?);
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i11.Meal?);
@override
_i18.Future<void> fetchAndSetAllPlansSparse() =>
@@ -967,8 +946,7 @@ class MockUserProvider extends _i1.Mock implements _i21.UserProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(
@@ -1164,8 +1142,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
///
/// See the documentation for Mockito's code generation for more information.
// ignore: must_be_immutable
class MockSharedPreferencesAsync extends _i1.Mock
implements _i14.SharedPreferencesAsync {
class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferencesAsync {
MockSharedPreferencesAsync() {
_i1.throwOnMissingStub(this);
}

View File

@@ -39,60 +39,50 @@ import 'package:wger/providers/user.dart' as _i17;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeVariation_1 extends _i1.SmartFake implements _i3.Variation {
_FakeVariation_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeVariation_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake
implements _i4.SharedPreferencesAsync {
class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake implements _i4.SharedPreferencesAsync {
_FakeSharedPreferencesAsync_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExerciseDatabase_3 extends _i1.SmartFake
implements _i5.ExerciseDatabase {
class _FakeExerciseDatabase_3 extends _i1.SmartFake implements _i5.ExerciseDatabase {
_FakeExerciseDatabase_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExercise_4 extends _i1.SmartFake implements _i6.Exercise {
_FakeExercise_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeExercise_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeExerciseCategory_5 extends _i1.SmartFake
implements _i7.ExerciseCategory {
class _FakeExerciseCategory_5 extends _i1.SmartFake implements _i7.ExerciseCategory {
_FakeExerciseCategory_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeEquipment_6 extends _i1.SmartFake implements _i8.Equipment {
_FakeEquipment_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeEquipment_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMuscle_7 extends _i1.SmartFake implements _i9.Muscle {
_FakeMuscle_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMuscle_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeLanguage_8 extends _i1.SmartFake implements _i10.Language {
_FakeLanguage_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLanguage_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [AddExerciseProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockAddExerciseProvider extends _i1.Mock
implements _i11.AddExerciseProvider {
class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvider {
MockAddExerciseProvider() {
_i1.throwOnMissingStub(this);
}
@@ -153,8 +143,7 @@ class MockAddExerciseProvider extends _i1.Mock
@override
bool get newVariation =>
(super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false) as bool);
@override
_i3.Variation get variation =>
@@ -228,11 +217,10 @@ class MockAddExerciseProvider extends _i1.Mock
);
@override
set languageTranslation(_i10.Language? _languageTranslation) =>
super.noSuchMethod(
Invocation.setter(#languageTranslation, _languageTranslation),
returnValueForMissingStub: null,
);
set languageTranslation(_i10.Language? _languageTranslation) => super.noSuchMethod(
Invocation.setter(#languageTranslation, _languageTranslation),
returnValueForMissingStub: null,
);
@override
set alternateNamesEn(List<String>? _alternateNamesEn) => super.noSuchMethod(
@@ -241,11 +229,10 @@ class MockAddExerciseProvider extends _i1.Mock
);
@override
set alternateNamesTrans(List<String>? _alternateNamesTrans) =>
super.noSuchMethod(
Invocation.setter(#alternateNamesTrans, _alternateNamesTrans),
returnValueForMissingStub: null,
);
set alternateNamesTrans(List<String>? _alternateNamesTrans) => super.noSuchMethod(
Invocation.setter(#alternateNamesTrans, _alternateNamesTrans),
returnValueForMissingStub: null,
);
@override
set category(_i7.ExerciseCategory? _category) => super.noSuchMethod(
@@ -285,8 +272,7 @@ class MockAddExerciseProvider extends _i1.Mock
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(
@@ -295,11 +281,10 @@ class MockAddExerciseProvider extends _i1.Mock
);
@override
void addExerciseImages(List<_i13.ExerciseSubmissionImage>? images) =>
super.noSuchMethod(
Invocation.method(#addExerciseImages, [images]),
returnValueForMissingStub: null,
);
void addExerciseImages(List<_i13.ExerciseSubmissionImage>? images) => super.noSuchMethod(
Invocation.method(#addExerciseImages, [images]),
returnValueForMissingStub: null,
);
@override
void removeImage(String? path) => super.noSuchMethod(
@@ -423,8 +408,7 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(
@@ -589,11 +573,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
);
@override
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
@override
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
@@ -603,8 +586,7 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i15.Future<void> setFilters(_i20.Filters? newFilters) =>

View File

@@ -30,42 +30,35 @@ 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)
: super(parent, parentInvocation);
}
class _FakeExerciseDatabase_1 extends _i1.SmartFake
implements _i3.ExerciseDatabase {
class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase {
_FakeExerciseDatabase_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise {
_FakeExercise_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeExercise_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeExerciseCategory_3 extends _i1.SmartFake
implements _i5.ExerciseCategory {
class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory {
_FakeExerciseCategory_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeEquipment_4 extends _i1.SmartFake implements _i6.Equipment {
_FakeEquipment_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeEquipment_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMuscle_5 extends _i1.SmartFake implements _i7.Muscle {
_FakeMuscle_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMuscle_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language {
_FakeLanguage_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLanguage_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [ExercisesProvider].
@@ -167,11 +160,10 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
);
@override
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
@override
set languages(List<_i8.Language>? languages) => super.noSuchMethod(
@@ -181,8 +173,7 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i10.Future<void> setFilters(_i9.Filters? newFilters) =>

View File

@@ -26,14 +26,12 @@ 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)
: super(parent, parentInvocation);
}
class _FakeMeasurementCategory_1 extends _i1.SmartFake
implements _i3.MeasurementCategory {
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
_FakeMeasurementCategory_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
@@ -41,8 +39,7 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake
/// A class which mocks [MeasurementProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockMeasurementProvider extends _i1.Mock
implements _i4.MeasurementProvider {
class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvider {
MockMeasurementProvider() {
_i1.throwOnMissingStub(this);
}
@@ -68,8 +65,7 @@ class MockMeasurementProvider extends _i1.Mock
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -29,44 +29,37 @@ import 'package:wger/providers/nutrition.dart' as _i8;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeIngredientDatabase_1 extends _i1.SmartFake
implements _i3.IngredientDatabase {
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
_FakeIngredientDatabase_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeNutritionalPlan_2 extends _i1.SmartFake
implements _i4.NutritionalPlan {
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
_FakeNutritionalPlan_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal {
_FakeMeal_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMeal_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem {
_FakeMealItem_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMealItem_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
_FakeIngredient_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeIngredient_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [NutritionPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockNutritionPlansProvider extends _i1.Mock
implements _i8.NutritionPlansProvider {
class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider {
MockNutritionPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -123,8 +116,7 @@ class MockNutritionPlansProvider extends _i1.Mock
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -29,44 +29,37 @@ import 'package:wger/providers/nutrition.dart' as _i8;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeIngredientDatabase_1 extends _i1.SmartFake
implements _i3.IngredientDatabase {
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
_FakeIngredientDatabase_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeNutritionalPlan_2 extends _i1.SmartFake
implements _i4.NutritionalPlan {
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
_FakeNutritionalPlan_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal {
_FakeMeal_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMeal_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem {
_FakeMealItem_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMealItem_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
_FakeIngredient_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeIngredient_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [NutritionPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockNutritionPlansProvider extends _i1.Mock
implements _i8.NutritionPlansProvider {
class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider {
MockNutritionPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -123,8 +116,7 @@ class MockNutritionPlansProvider extends _i1.Mock
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -30,27 +30,22 @@ import 'package:wger/providers/base_provider.dart' as _i4;
// ignore_for_file: subtype_of_sealed_class
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
_FakeAuthProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
_FakeClient_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_2 extends _i1.SmartFake implements Uri {
_FakeUri_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
_FakeResponse_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeStreamedResponse_4 extends _i1.SmartFake
implements _i3.StreamedResponse {
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
_FakeStreamedResponse_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
@@ -212,13 +207,10 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
@override
bool get dataInit =>
(super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool);
@override
bool get isAuth =>
(super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false)
as bool);
bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool);
@override
set token(String? _token) => super.noSuchMethod(
@@ -239,11 +231,10 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
);
@override
set applicationVersion(_i6.PackageInfo? _applicationVersion) =>
super.noSuchMethod(
Invocation.setter(#applicationVersion, _applicationVersion),
returnValueForMissingStub: null,
);
set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod(
Invocation.setter(#applicationVersion, _applicationVersion),
returnValueForMissingStub: null,
);
@override
set metadata(Map<String, String>? _metadata) => super.noSuchMethod(
@@ -271,8 +262,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i5.Future<void> setServerVersion() =>

View File

@@ -30,27 +30,22 @@ import 'package:wger/providers/base_provider.dart' as _i8;
// ignore_for_file: subtype_of_sealed_class
class _FakeClient_0 extends _i1.SmartFake implements _i2.Client {
_FakeClient_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeAuthProvider_1 extends _i1.SmartFake implements _i3.AuthProvider {
_FakeAuthProvider_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeAuthProvider_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_2 extends _i1.SmartFake implements Uri {
_FakeUri_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
_FakeResponse_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeStreamedResponse_4 extends _i1.SmartFake
implements _i2.StreamedResponse {
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
_FakeStreamedResponse_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
@@ -89,13 +84,10 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
@override
bool get dataInit =>
(super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool);
@override
bool get isAuth =>
(super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false)
as bool);
bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool);
@override
set token(String? _token) => super.noSuchMethod(
@@ -116,11 +108,10 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
);
@override
set applicationVersion(_i4.PackageInfo? _applicationVersion) =>
super.noSuchMethod(
Invocation.setter(#applicationVersion, _applicationVersion),
returnValueForMissingStub: null,
);
set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod(
Invocation.setter(#applicationVersion, _applicationVersion),
returnValueForMissingStub: null,
);
@override
set metadata(Map<String, String>? _metadata) => super.noSuchMethod(
@@ -148,8 +139,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i5.Future<void> setServerVersion() =>

View File

@@ -26,12 +26,10 @@ import 'package:mockito/src/dummies.dart' as _i5;
// ignore_for_file: subtype_of_sealed_class
class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
_FakeResponse_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeStreamedResponse_1 extends _i1.SmartFake
implements _i2.StreamedResponse {
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
_FakeStreamedResponse_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -45,108 +45,88 @@ import 'package:wger/providers/routines.dart' as _i23;
// ignore_for_file: subtype_of_sealed_class
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
_FakeAuthProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
_FakeClient_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_2 extends _i1.SmartFake implements Uri {
_FakeUri_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
_FakeResponse_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
implements _i4.WgerBaseProvider {
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
_FakeWgerBaseProvider_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExerciseDatabase_5 extends _i1.SmartFake
implements _i5.ExerciseDatabase {
class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase {
_FakeExerciseDatabase_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise {
_FakeExercise_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeExercise_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeExerciseCategory_7 extends _i1.SmartFake
implements _i7.ExerciseCategory {
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory {
_FakeExerciseCategory_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeEquipment_8 extends _i1.SmartFake implements _i8.Equipment {
_FakeEquipment_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeEquipment_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMuscle_9 extends _i1.SmartFake implements _i9.Muscle {
_FakeMuscle_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMuscle_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeLanguage_10 extends _i1.SmartFake implements _i10.Language {
_FakeLanguage_10(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLanguage_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWeightUnit_11 extends _i1.SmartFake implements _i11.WeightUnit {
_FakeWeightUnit_11(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_11(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_12 extends _i1.SmartFake
implements _i12.RepetitionUnit {
class _FakeRepetitionUnit_12 extends _i1.SmartFake implements _i12.RepetitionUnit {
_FakeRepetitionUnit_12(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_13 extends _i1.SmartFake implements _i13.Routine {
_FakeRoutine_13(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_13(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_14 extends _i1.SmartFake implements _i14.Day {
_FakeDay_14(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_14(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_15 extends _i1.SmartFake implements _i15.Slot {
_FakeSlot_15(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_15(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_16 extends _i1.SmartFake implements _i16.SlotEntry {
_FakeSlotEntry_16(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_16(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_17 extends _i1.SmartFake implements _i17.BaseConfig {
_FakeBaseConfig_17(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_17(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_18 extends _i1.SmartFake
implements _i18.WorkoutSession {
class _FakeWorkoutSession_18 extends _i1.SmartFake implements _i18.WorkoutSession {
_FakeWorkoutSession_18(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_19 extends _i1.SmartFake implements _i19.Log {
_FakeLog_19(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_19(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [WgerBaseProvider].
@@ -374,11 +354,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
);
@override
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
@override
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
@@ -388,8 +367,7 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i20.Future<void> setFilters(_i21.Filters? newFilters) =>
@@ -777,16 +755,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
);
@override
set repetitionUnits(List<_i12.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i12.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -25,23 +25,19 @@ import 'package:wger/providers/base_provider.dart' as _i4;
// ignore_for_file: subtype_of_sealed_class
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
_FakeAuthProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
_FakeClient_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_2 extends _i1.SmartFake implements Uri {
_FakeUri_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
_FakeResponse_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [WgerBaseProvider].

View File

@@ -33,61 +33,50 @@ import 'package:wger/providers/exercises.dart' as _i12;
// ignore_for_file: subtype_of_sealed_class
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
_FakeAuthProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
_FakeClient_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_2 extends _i1.SmartFake implements Uri {
_FakeUri_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
_FakeResponse_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
implements _i4.WgerBaseProvider {
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
_FakeWgerBaseProvider_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExerciseDatabase_5 extends _i1.SmartFake
implements _i5.ExerciseDatabase {
class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase {
_FakeExerciseDatabase_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise {
_FakeExercise_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeExercise_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeExerciseCategory_7 extends _i1.SmartFake
implements _i7.ExerciseCategory {
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory {
_FakeExerciseCategory_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeEquipment_8 extends _i1.SmartFake implements _i8.Equipment {
_FakeEquipment_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeEquipment_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMuscle_9 extends _i1.SmartFake implements _i9.Muscle {
_FakeMuscle_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMuscle_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeLanguage_10 extends _i1.SmartFake implements _i10.Language {
_FakeLanguage_10(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLanguage_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [WgerBaseProvider].
@@ -315,11 +304,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
);
@override
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
Invocation.setter(#filteredExercises, newFilteredExercises),
returnValueForMissingStub: null,
);
@override
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
@@ -329,8 +317,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
_i11.Future<void> setFilters(_i12.Filters? newFilters) =>

View File

@@ -25,23 +25,19 @@ import 'package:wger/providers/base_provider.dart' as _i4;
// ignore_for_file: subtype_of_sealed_class
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
_FakeAuthProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
_FakeClient_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeUri_2 extends _i1.SmartFake implements Uri {
_FakeUri_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
_FakeResponse_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [WgerBaseProvider].

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -36,57 +36,47 @@ import 'package:wger/providers/routines.dart' as _i12;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
implements _i2.WgerBaseProvider {
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
_FakeWeightUnit_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeRepetitionUnit_2 extends _i1.SmartFake
implements _i4.RepetitionUnit {
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
_FakeRepetitionUnit_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
_FakeRoutine_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
_FakeDay_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
_FakeSlot_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
_FakeSlotEntry_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
_FakeBaseConfig_7(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeWorkoutSession_8 extends _i1.SmartFake
implements _i10.WorkoutSession {
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
_FakeWorkoutSession_8(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
_FakeLog_9(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [RoutinesProvider].
@@ -167,16 +157,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
);
@override
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) =>
super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod(
Invocation.setter(#repetitionUnits, repetitionUnits),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(

View File

@@ -33,43 +33,36 @@ import 'package:wger/providers/user.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)
: super(parent, parentInvocation);
}
class _FakeSharedPreferencesAsync_1 extends _i1.SmartFake
implements _i3.SharedPreferencesAsync {
class _FakeSharedPreferencesAsync_1 extends _i1.SmartFake implements _i3.SharedPreferencesAsync {
_FakeSharedPreferencesAsync_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeIngredientDatabase_2 extends _i1.SmartFake
implements _i4.IngredientDatabase {
class _FakeIngredientDatabase_2 extends _i1.SmartFake implements _i4.IngredientDatabase {
_FakeIngredientDatabase_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeNutritionalPlan_3 extends _i1.SmartFake
implements _i5.NutritionalPlan {
class _FakeNutritionalPlan_3 extends _i1.SmartFake implements _i5.NutritionalPlan {
_FakeNutritionalPlan_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeMeal_4 extends _i1.SmartFake implements _i6.Meal {
_FakeMeal_4(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMeal_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeMealItem_5 extends _i1.SmartFake implements _i7.MealItem {
_FakeMealItem_5(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeMealItem_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
class _FakeIngredient_6 extends _i1.SmartFake implements _i8.Ingredient {
_FakeIngredient_6(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
_FakeIngredient_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
}
/// A class which mocks [UserProvider].
@@ -130,8 +123,7 @@ class MockUserProvider extends _i1.Mock implements _i9.UserProvider {
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(
@@ -200,8 +192,7 @@ class MockUserProvider extends _i1.Mock implements _i9.UserProvider {
/// A class which mocks [NutritionPlansProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockNutritionPlansProvider extends _i1.Mock
implements _i14.NutritionPlansProvider {
class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlansProvider {
MockNutritionPlansProvider() {
_i1.throwOnMissingStub(this);
}
@@ -258,8 +249,7 @@ class MockNutritionPlansProvider extends _i1.Mock
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
@override
void clear() => super.noSuchMethod(