diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index c9ade366..e3aecf65 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -10,8 +10,8 @@ - + diff --git a/lib/models/measurements/measurement_category.dart b/lib/models/measurements/measurement_category.dart index 2674e0c7..17dde893 100644 --- a/lib/models/measurements/measurement_category.dart +++ b/lib/models/measurements/measurement_category.dart @@ -1,6 +1,5 @@ import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:uuid/uuid.dart'; import 'package:wger/exceptions/no_such_entry_exception.dart'; import 'package:wger/models/measurements/measurement_entry.dart'; @@ -11,9 +10,6 @@ class MeasurementCategory extends Equatable { @JsonKey(required: true) final int? id; - @JsonKey(required: true) - final String? uuid; - @JsonKey(required: true) final String name; @@ -23,38 +19,35 @@ class MeasurementCategory extends Equatable { @JsonKey(required: true) final String unit; - @JsonKey(required: true) - final String source; + @JsonKey(required: true, name: 'externally_synced') + final bool externallySynced; - @JsonKey(defaultValue: [], toJson: _nullValue) + @JsonKey(toJson: _nullValue) final List entries; - MeasurementCategory({ + const MeasurementCategory({ this.id, required this.name, required this.unit, this.entries = const [], this.internalName, - this.source = 'manual', - String? uuid, - }) : uuid = uuid ?? const Uuid().v7(); + this.externallySynced = false, + }); MeasurementCategory copyWith({ int? id, - String? uuid, String? name, String? internalName, String? unit, - String? source, + bool? externallySynced, List? entries, }) { return MeasurementCategory( id: id ?? this.id, - uuid: uuid ?? this.uuid, name: name ?? this.name, internalName: internalName ?? this.internalName, unit: unit ?? this.unit, - source: source ?? this.source, + externallySynced: externallySynced ?? this.externallySynced, entries: entries ?? this.entries, ); } @@ -66,10 +59,6 @@ class MeasurementCategory extends Equatable { ); } - bool get isExternal => source != 'manual'; - - bool get isInternal => source == 'manual'; - // Boilerplate factory MeasurementCategory.fromJson(Map json) => _$MeasurementCategoryFromJson(json); diff --git a/lib/models/measurements/measurement_category.g.dart b/lib/models/measurements/measurement_category.g.dart index 8abe2f26..2790ba71 100644 --- a/lib/models/measurements/measurement_category.g.dart +++ b/lib/models/measurements/measurement_category.g.dart @@ -7,7 +7,10 @@ part of 'measurement_category.dart'; // ************************************************************************** MeasurementCategory _$MeasurementCategoryFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'uuid', 'name', 'internal_name', 'unit', 'source']); + $checkKeys( + json, + requiredKeys: const ['id', 'name', 'internal_name', 'unit', 'externally_synced'], + ); return MeasurementCategory( id: (json['id'] as num?)?.toInt(), name: json['name'] as String, @@ -16,19 +19,17 @@ MeasurementCategory _$MeasurementCategoryFromJson(Map json) { (json['entries'] as List?) ?.map((e) => MeasurementEntry.fromJson(e as Map)) .toList() ?? - [], + const [], internalName: json['internal_name'] as String?, - source: json['source'] as String? ?? 'manual', - uuid: json['uuid'] as String?, + externallySynced: json['externally_synced'] as bool? ?? false, ); } Map _$MeasurementCategoryToJson(MeasurementCategory instance) => { 'id': instance.id, - 'uuid': instance.uuid, 'name': instance.name, 'internal_name': instance.internalName, 'unit': instance.unit, - 'source': instance.source, + 'externally_synced': instance.externallySynced, 'entries': MeasurementCategory._nullValue(instance.entries), }; diff --git a/lib/providers/measurement.dart b/lib/providers/measurement.dart index e4925565..bd650d60 100644 --- a/lib/providers/measurement.dart +++ b/lib/providers/measurement.dart @@ -146,7 +146,7 @@ class MeasurementProvider with ChangeNotifier { final Uri postUri = baseProvider.makeUrl(_entryUrl); final Map newEntryMap = await baseProvider.post(entry.toJson(), postUri); - final MeasurementEntry newEntry = MeasurementEntry.fromJson(newEntryMap); + final newEntry = MeasurementEntry.fromJson(newEntryMap); final MeasurementCategory category = findCategoryById(newEntry.category); diff --git a/lib/screens/health_service.dart b/lib/screens/health_service.dart index f99bc4ca..6214b55e 100644 --- a/lib/screens/health_service.dart +++ b/lib/screens/health_service.dart @@ -33,7 +33,7 @@ class HealthService { try { final granted = await health.requestAuthorization(types, permissions: permissions); if (granted) { - await _syncHistoricalData(); + await syncHistoricalData(); } provider.setConnected(granted); provider.setLoading(false); @@ -59,10 +59,56 @@ class HealthService { } } - String internalNameForType(HealthDataType type) { + static String internalNameForType(HealthDataType type) { return type.toString().split('.').last.toLowerCase(); } + // TODO: i18n + String displayNameForType(HealthDataType type) { + switch (type) { + case HealthDataType.HEART_RATE: + return 'Heart Rate'; + case HealthDataType.STEPS: + return 'Steps'; + case HealthDataType.ACTIVE_ENERGY_BURNED: + return 'Active Energy Burned'; + case HealthDataType.SLEEP_ASLEEP: + return 'Sleep Asleep'; + case HealthDataType.DISTANCE_DELTA: + return 'Distance'; + default: + return internalNameForType(type); + } + } + + // TODO: i18n + String unitForType(HealthDataType type) { + switch (type) { + case HealthDataType.HEART_RATE: + return 'bpm'; + case HealthDataType.STEPS: + return 'steps'; + case HealthDataType.ACTIVE_ENERGY_BURNED: + return 'kcal'; + case HealthDataType.SLEEP_ASLEEP: + return 'minutes'; + case HealthDataType.DISTANCE_DELTA: + return 'm'; + default: + return ''; + } + } + + String sourceForPlatform() { + if (Platform.isAndroid) { + return 'google_health'; + } + if (Platform.isIOS) { + return 'apple_health'; + } + return ''; + } + /// Ensures all required categories for the given HealthDataTypes exist in MeasurementProvider Future _ensureCategoriesExist(List types) async { // Only run on Android and iOS @@ -72,46 +118,6 @@ class HealthService { await measurementProvider.fetchAndSetCategories(); final existingCategories = measurementProvider.categories; - String displayNameForType(HealthDataType type) { - switch (type) { - case HealthDataType.HEART_RATE: - return 'Heart Rate'; - case HealthDataType.STEPS: - return 'Steps'; - case HealthDataType.ACTIVE_ENERGY_BURNED: - return 'Active Energy Burned'; - case HealthDataType.SLEEP_ASLEEP: - return 'Sleep Asleep'; - case HealthDataType.DISTANCE_DELTA: - return 'Distance'; - default: - return internalNameForType(type); - } - } - - String unitForType(HealthDataType type) { - switch (type) { - case HealthDataType.HEART_RATE: - return 'bpm'; - case HealthDataType.STEPS: - return 'steps'; - case HealthDataType.ACTIVE_ENERGY_BURNED: - return 'kcal'; - case HealthDataType.SLEEP_ASLEEP: - return 'minutes'; - case HealthDataType.DISTANCE_DELTA: - return 'm'; - default: - return ''; - } - } - - String sourceForPlatform() { - if (Platform.isAndroid) return 'google_health'; - if (Platform.isIOS) return 'apple_health'; - return ''; - } - for (final type in types) { final internalName = internalNameForType(type); final exists = existingCategories.any((cat) => cat.internalName == internalName); @@ -121,7 +127,7 @@ class HealthService { name: displayNameForType(type), internalName: internalName, unit: unitForType(type), - source: sourceForPlatform(), + externallySynced: true, ), ); } @@ -129,9 +135,12 @@ class HealthService { } /// Fetch historical health data for the last 30 days - Future _syncHistoricalData() async { + Future syncHistoricalData() async { + provider.setLoading(true); + provider.setError(null); + final now = DateTime.now(); - final startTime = now.subtract(const Duration(days: 30)); + final startTime = now.subtract(const Duration(days: 5)); final types = [ HealthDataType.HEART_RATE, HealthDataType.STEPS, @@ -152,48 +161,38 @@ class HealthService { types: types, ); final entries = dataPoints.map((point) { - String unit; - switch (point.type) { - case HealthDataType.HEART_RATE: - unit = 'bpm'; - break; - case HealthDataType.STEPS: - unit = 'steps'; - break; - case HealthDataType.ACTIVE_ENERGY_BURNED: - unit = 'kcal'; - break; - case HealthDataType.SLEEP_ASLEEP: - unit = 'minutes'; - break; - case HealthDataType.DISTANCE_DELTA: - unit = 'm'; - break; - default: - unit = point.unitString ?? ''; - } - // Kategorie-ID dynamisch suchen + final unit = unitForType(point.type); final internalName = internalNameForType(point.type); final category = updatedCategories.firstWhere( (cat) => cat.internalName == internalName, orElse: () => throw Exception('No category for $internalName'), ); + final value = point.value is NumericHealthValue + ? (point.value as NumericHealthValue).numericValue + : 0; + if (value is! NumericHealthValue) { + _logger.warning('Skipping non-numeric value for ${point.type}: ${point.value}'); + } + //final value = point.value is NumericHealthValue ? point.value : 0; return MeasurementEntry( id: null, category: category.id!, date: point.dateFrom, - value: 3, - // value: point.value, + value: value, notes: unit, source: point.sourceName ?? 'health_platform', uuid: point.uuid ?? null, created: DateTime.now(), ); }).toList(); + _logger.info('Created ${entries.length} entries'); await measurementProvider.addEntries(entries); - } catch (e) { + } catch (e, stackTrace) { _logger.warning('Error syncing historical health data: $e'); + _logger.warning(stackTrace); provider.setError('Error syncing historical health data: $e'); + } finally { + provider.setLoading(false); } } } diff --git a/lib/screens/health_settings_screen.dart b/lib/screens/health_settings_screen.dart index b63cf84a..fad25ecb 100644 --- a/lib/screens/health_settings_screen.dart +++ b/lib/screens/health_settings_screen.dart @@ -32,19 +32,47 @@ class _HealthSettingsScreenState extends State { final measurementProvider = Provider.of(context, listen: false); healthService = HealthService(provider, measurementProvider); return Scaffold( - appBar: AppBar(title: const Text('Health Data Connection')), + appBar: AppBar(title: const Text('Health Connect')), body: Center( child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 8, children: [ - SizedBox( - width: 220, - height: 48, - child: ElevatedButton( - onPressed: provider.isLoading || provider.isConnected + const Icon(Icons.sync, size: 50), + Text( + 'Sync your health data with wger', + style: Theme.of(context).textTheme.headlineMedium, + ), + const Text( + 'You can sync data from Android Health or Apple Health to wger, the ' + 'data will be imported as measurements. You can choose which data to ' + 'sync in the next step.', + ), + const Text('To stop syncing, disconnect in the settings.'), + ElevatedButton( + onPressed: provider.isLoading || provider.isConnected + ? null + : () async { + await healthService.requestPermissions(); + }, + child: provider.isLoading + ? const SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation(Colors.white), + ), + ) + : Text(provider.isConnected ? 'Connected' : 'Connect to Health Data'), + ), + if (provider.isConnected) + ElevatedButton( + onPressed: provider.isLoading ? null : () async { - await healthService.requestPermissions(); + await healthService.syncHistoricalData(); }, child: provider.isLoading ? const SizedBox( @@ -55,9 +83,8 @@ class _HealthSettingsScreenState extends State { valueColor: AlwaysStoppedAnimation(Colors.white), ), ) - : Text(provider.isConnected ? 'Connected' : 'Connect to Health Data'), + : Text('Fetch data'), ), - ), if (provider.errorMessage != null) Padding( padding: const EdgeInsets.only(top: 16.0), diff --git a/lib/screens/measurement_entries_screen.dart b/lib/screens/measurement_entries_screen.dart index a575029a..af035b5d 100644 --- a/lib/screens/measurement_entries_screen.dart +++ b/lib/screens/measurement_entries_screen.dart @@ -114,7 +114,7 @@ class MeasurementEntriesScreen extends StatelessWidget { ), ], ), - floatingActionButton: category.isInternal + floatingActionButton: category.externallySynced ? FloatingActionButton( child: const Icon(Icons.add, color: Colors.white), onPressed: () { diff --git a/lib/widgets/measurements/categories_card.dart b/lib/widgets/measurements/categories_card.dart index 85ace2e5..2e22bd96 100644 --- a/lib/widgets/measurements/categories_card.dart +++ b/lib/widgets/measurements/categories_card.dart @@ -30,10 +30,14 @@ class CategoriesCard extends StatelessWidget { padding: const EdgeInsets.only(top: 5), child: Text(currentCategory.name, style: Theme.of(context).textTheme.titleLarge), ), - Padding( - padding: const EdgeInsets.only(top: 5), - child: Text('Externally synchronized', style: Theme.of(context).textTheme.titleSmall), - ), + if (currentCategory.externallySynced) + Padding( + padding: const EdgeInsets.only(top: 5), + child: Text( + 'Externally synchronized', + style: Theme.of(context).textTheme.titleSmall, + ), + ), Container( padding: const EdgeInsets.all(10), height: 220, @@ -59,7 +63,7 @@ class CategoriesCard extends StatelessWidget { ); }, ), - if (currentCategory.isInternal) + if (!currentCategory.externallySynced) IconButton( onPressed: () async { await Navigator.pushNamed( diff --git a/test/auth/auth_screen_test.mocks.dart b/test/auth/auth_screen_test.mocks.dart index 3d3e2163..f303de9d 100644 --- a/test/auth/auth_screen_test.mocks.dart +++ b/test/auth/auth_screen_test.mocks.dart @@ -27,23 +27,12 @@ import 'package:mockito/src/dummies.dart' as _i5; // ignore_for_file: invalid_use_of_internal_member 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 { - _FakeStreamedResponse_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Client]. @@ -55,46 +44,24 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post( @@ -104,28 +71,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> put( @@ -135,28 +93,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> patch( @@ -166,28 +115,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> delete( @@ -197,85 +137,53 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue(this, Invocation.method(#read, [url], {#headers: headers})), + ), + ) + as _i3.Future); @override - _i3.Future<_i6.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), - ) as _i3.Future<_i6.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + ) + as _i3.Future<_i6.Uint8List>); @override - _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i3.Future<_i2.StreamedResponse>); + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_1(this, Invocation.method(#send, [request])), + ), + ) + as _i3.Future<_i2.StreamedResponse>); @override - void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValueForMissingStub: null, - ); + void close() => + super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null); } diff --git a/test/exercises/contribute_exercise_test.mocks.dart b/test/exercises/contribute_exercise_test.mocks.dart index 25cee87e..0ad7e7b6 100644 --- a/test/exercises/contribute_exercise_test.mocks.dart +++ b/test/exercises/contribute_exercise_test.mocks.dart @@ -41,93 +41,43 @@ import 'package:wger/providers/user.dart' as _i17; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeSharedPreferencesAsync_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSharedPreferencesAsync_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_3 extends _i1.SmartFake implements _i5.ExerciseDatabase { - _FakeExerciseDatabase_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeExerciseCategory_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -139,321 +89,218 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i12.File> get exerciseImages => (super.noSuchMethod( - Invocation.getter(#exerciseImages), - returnValue: <_i12.File>[], - ) as List<_i12.File>); + List<_i12.File> get exerciseImages => + (super.noSuchMethod(Invocation.getter(#exerciseImages), returnValue: <_i12.File>[]) + as List<_i12.File>); @override - List get alternateNamesEn => (super.noSuchMethod( - Invocation.getter(#alternateNamesEn), - returnValue: [], - ) as List); + List get alternateNamesEn => + (super.noSuchMethod(Invocation.getter(#alternateNamesEn), returnValue: []) + as List); @override - List get alternateNamesTrans => (super.noSuchMethod( - Invocation.getter(#alternateNamesTrans), - returnValue: [], - ) as List); + List get alternateNamesTrans => + (super.noSuchMethod(Invocation.getter(#alternateNamesTrans), returnValue: []) + as List); @override - List<_i8.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i8.Equipment>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[]) + as List<_i8.Equipment>); @override - bool get newVariation => (super.noSuchMethod( - Invocation.getter(#newVariation), - returnValue: false, - ) as bool); + bool get newVariation => + (super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false) as bool); @override - _i3.Variation get variation => (super.noSuchMethod( - Invocation.getter(#variation), - returnValue: _FakeVariation_1( - this, - Invocation.getter(#variation), - ), - ) as _i3.Variation); + _i3.Variation get variation => + (super.noSuchMethod( + Invocation.getter(#variation), + returnValue: _FakeVariation_1(this, Invocation.getter(#variation)), + ) + as _i3.Variation); @override - List<_i9.Muscle> get primaryMuscles => (super.noSuchMethod( - Invocation.getter(#primaryMuscles), - returnValue: <_i9.Muscle>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get primaryMuscles => + (super.noSuchMethod(Invocation.getter(#primaryMuscles), returnValue: <_i9.Muscle>[]) + as List<_i9.Muscle>); @override - List<_i9.Muscle> get secondaryMuscles => (super.noSuchMethod( - Invocation.getter(#secondaryMuscles), - returnValue: <_i9.Muscle>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get secondaryMuscles => + (super.noSuchMethod(Invocation.getter(#secondaryMuscles), returnValue: <_i9.Muscle>[]) + as List<_i9.Muscle>); @override - _i13.ExerciseSubmissionApi get exerciseApiObject => (super.noSuchMethod( - Invocation.getter(#exerciseApiObject), - returnValue: _i14.dummyValue<_i13.ExerciseSubmissionApi>( - this, - Invocation.getter(#exerciseApiObject), - ), - ) as _i13.ExerciseSubmissionApi); + _i13.ExerciseSubmissionApi get exerciseApiObject => + (super.noSuchMethod( + Invocation.getter(#exerciseApiObject), + returnValue: _i14.dummyValue<_i13.ExerciseSubmissionApi>( + this, + Invocation.getter(#exerciseApiObject), + ), + ) + as _i13.ExerciseSubmissionApi); @override set exerciseNameEn(String? value) => super.noSuchMethod( - Invocation.setter( - #exerciseNameEn, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#exerciseNameEn, value), + returnValueForMissingStub: null, + ); @override set exerciseNameTrans(String? value) => super.noSuchMethod( - Invocation.setter( - #exerciseNameTrans, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#exerciseNameTrans, value), + returnValueForMissingStub: null, + ); @override - set descriptionEn(String? value) => super.noSuchMethod( - Invocation.setter( - #descriptionEn, - value, - ), - returnValueForMissingStub: null, - ); + set descriptionEn(String? value) => + super.noSuchMethod(Invocation.setter(#descriptionEn, value), returnValueForMissingStub: null); @override set descriptionTrans(String? value) => super.noSuchMethod( - Invocation.setter( - #descriptionTrans, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#descriptionTrans, value), + returnValueForMissingStub: null, + ); @override - set languageEn(_i10.Language? value) => super.noSuchMethod( - Invocation.setter( - #languageEn, - value, - ), - returnValueForMissingStub: null, - ); + set languageEn(_i10.Language? value) => + super.noSuchMethod(Invocation.setter(#languageEn, value), returnValueForMissingStub: null); @override set languageTranslation(_i10.Language? value) => super.noSuchMethod( - Invocation.setter( - #languageTranslation, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#languageTranslation, value), + returnValueForMissingStub: null, + ); @override set alternateNamesEn(List? value) => super.noSuchMethod( - Invocation.setter( - #alternateNamesEn, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#alternateNamesEn, value), + returnValueForMissingStub: null, + ); @override set alternateNamesTrans(List? value) => super.noSuchMethod( - Invocation.setter( - #alternateNamesTrans, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#alternateNamesTrans, value), + returnValueForMissingStub: null, + ); @override - set category(_i7.ExerciseCategory? value) => super.noSuchMethod( - Invocation.setter( - #category, - value, - ), - returnValueForMissingStub: null, - ); + set category(_i7.ExerciseCategory? value) => + super.noSuchMethod(Invocation.setter(#category, value), returnValueForMissingStub: null); @override - set equipment(List<_i8.Equipment>? equipment) => super.noSuchMethod( - Invocation.setter( - #equipment, - equipment, - ), - returnValueForMissingStub: null, - ); + set equipment(List<_i8.Equipment>? equipment) => + super.noSuchMethod(Invocation.setter(#equipment, equipment), returnValueForMissingStub: null); @override - set newVariationForExercise(int? value) => super.noSuchMethod( - Invocation.setter( - #newVariationForExercise, - value, - ), - returnValueForMissingStub: null, - ); + set variationConnectToExercise(int? value) => super.noSuchMethod( + Invocation.setter(#variationConnectToExercise, value), + returnValueForMissingStub: null, + ); @override set variationId(int? variation) => super.noSuchMethod( - Invocation.setter( - #variationId, - variation, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#variationId, variation), + returnValueForMissingStub: null, + ); @override set primaryMuscles(List<_i9.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter( - #primaryMuscles, - muscles, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#primaryMuscles, muscles), + returnValueForMissingStub: null, + ); @override set secondaryMuscles(List<_i9.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter( - #secondaryMuscles, - muscles, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#secondaryMuscles, muscles), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override void addExerciseImages(List<_i12.File>? exercises) => super.noSuchMethod( - Invocation.method( - #addExerciseImages, - [exercises], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addExerciseImages, [exercises]), + returnValueForMissingStub: null, + ); @override void removeExercise(String? path) => super.noSuchMethod( - Invocation.method( - #removeExercise, - [path], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeExercise, [path]), + returnValueForMissingStub: null, + ); @override - void printValues() => super.noSuchMethod( - Invocation.method( - #printValues, - [], - ), - returnValueForMissingStub: null, - ); + void printValues() => + super.noSuchMethod(Invocation.method(#printValues, []), returnValueForMissingStub: null); @override - _i15.Future addExercise() => (super.noSuchMethod( - Invocation.method( - #addExercise, - [], - ), - returnValue: _i15.Future.value(0), - ) as _i15.Future); - - @override - _i15.Future addExerciseSubmission() => (super.noSuchMethod( - Invocation.method( - #addExerciseSubmission, - [], - ), - returnValue: _i15.Future.value(0), - ) as _i15.Future); - - @override - _i15.Future addImages(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #addImages, - [exerciseId], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - _i15.Future validateLanguage( - String? input, - String? languageCode, - ) => + _i15.Future addExercise() => (super.noSuchMethod( - Invocation.method( - #validateLanguage, - [ - input, - languageCode, - ], - ), - returnValue: _i15.Future.value(false), - ) as _i15.Future); + Invocation.method(#addExercise, []), + returnValue: _i15.Future.value(0), + ) + as _i15.Future); + + @override + _i15.Future addExerciseSubmission() => + (super.noSuchMethod( + Invocation.method(#addExerciseSubmission, []), + returnValue: _i15.Future.value(0), + ) + as _i15.Future); + + @override + _i15.Future addImages(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#addImages, [exerciseId]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future validateLanguage(String? input, String? languageCode) => + (super.noSuchMethod( + Invocation.method(#validateLanguage, [input, languageCode]), + returnValue: _i15.Future.value(false), + ) + as _i15.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } /// A class which mocks [UserProvider]. @@ -465,145 +312,96 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider { } @override - _i18.ThemeMode get themeMode => (super.noSuchMethod( - Invocation.getter(#themeMode), - returnValue: _i18.ThemeMode.system, - ) as _i18.ThemeMode); + _i18.ThemeMode get themeMode => + (super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i18.ThemeMode.system) + as _i18.ThemeMode); @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i4.SharedPreferencesAsync get prefs => (super.noSuchMethod( - Invocation.getter(#prefs), - returnValue: _FakeSharedPreferencesAsync_2( - this, - Invocation.getter(#prefs), - ), - ) as _i4.SharedPreferencesAsync); + _i4.SharedPreferencesAsync get prefs => + (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakeSharedPreferencesAsync_2(this, Invocation.getter(#prefs)), + ) + as _i4.SharedPreferencesAsync); @override - set themeMode(_i18.ThemeMode? value) => super.noSuchMethod( - Invocation.setter( - #themeMode, - value, - ), - returnValueForMissingStub: null, - ); + set themeMode(_i18.ThemeMode? value) => + super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null); @override - set prefs(_i4.SharedPreferencesAsync? value) => super.noSuchMethod( - Invocation.setter( - #prefs, - value, - ), - returnValueForMissingStub: null, - ); + set prefs(_i4.SharedPreferencesAsync? value) => + super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null); @override - set profile(_i19.Profile? value) => super.noSuchMethod( - Invocation.setter( - #profile, - value, - ), - returnValueForMissingStub: null, - ); + set profile(_i19.Profile? value) => + super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - void setThemeMode(_i18.ThemeMode? mode) => super.noSuchMethod( - Invocation.method( - #setThemeMode, - [mode], - ), - returnValueForMissingStub: null, - ); + void setThemeMode(_i18.ThemeMode? mode) => + super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null); @override - _i15.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetProfile() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future saveProfile() => + (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future verifyEmail() => + (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } /// A class which mocks [ExercisesProvider]. @@ -615,292 +413,211 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i5.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_3( - this, - Invocation.getter(#database), - ), - ) as _i5.ExerciseDatabase); + _i5.ExerciseDatabase get database => + (super.noSuchMethod( + Invocation.getter(#database), + returnValue: _FakeExerciseDatabase_3(this, Invocation.getter(#database)), + ) + as _i5.ExerciseDatabase); @override - List<_i6.Exercise> get exercises => (super.noSuchMethod( - Invocation.getter(#exercises), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get exercises => + (super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - List<_i6.Exercise> get filteredExercises => (super.noSuchMethod( - Invocation.getter(#filteredExercises), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i7.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i7.ExerciseCategory>[], - ) as List<_i7.ExerciseCategory>); + List<_i7.ExerciseCategory> get categories => + (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i7.ExerciseCategory>[]) + as List<_i7.ExerciseCategory>); @override - List<_i9.Muscle> get muscles => (super.noSuchMethod( - Invocation.getter(#muscles), - returnValue: <_i9.Muscle>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get muscles => + (super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i9.Muscle>[]) + as List<_i9.Muscle>); @override - List<_i8.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i8.Equipment>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[]) + as List<_i8.Equipment>); @override - List<_i10.Language> get languages => (super.noSuchMethod( - Invocation.getter(#languages), - returnValue: <_i10.Language>[], - ) as List<_i10.Language>); + List<_i10.Language> get languages => + (super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i10.Language>[]) + as List<_i10.Language>); @override - set database(_i5.ExerciseDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); + set database(_i5.ExerciseDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); @override - set exercises(List<_i6.Exercise>? value) => super.noSuchMethod( - Invocation.setter( - #exercises, - value, - ), - returnValueForMissingStub: null, - ); + set exercises(List<_i6.Exercise>? value) => + super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null); @override set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @override - set languages(List<_i10.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), - returnValueForMissingStub: null, - ); + set languages(List<_i10.Language>? languages) => + super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i15.Future setFilters(_i20.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i15.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i6.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), - returnValue: _FakeExercise_4( - this, - Invocation.method( - #findExerciseById, - [id], - ), - ), - ) as _i6.Exercise); - - @override - List<_i6.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i15.Future setFilters(_i20.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_5( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i7.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_6( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i8.Equipment); + _i15.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_7( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i9.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_8( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i10.Language); + _i6.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_4(this, Invocation.method(#findExerciseById, [id])), + ) + as _i6.Exercise); @override - _i15.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i6.Exercise>[], + ) + as List<_i6.Exercise>); @override - _i15.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i7.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_5(this, Invocation.method(#findCategoryById, [id])), + ) + as _i7.ExerciseCategory); @override - _i15.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i8.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_6(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i8.Equipment); @override - _i15.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i9.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_7(this, Invocation.method(#findMuscleById, [id])), + ) + as _i9.Muscle); @override - _i15.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i10.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_8(this, Invocation.method(#findLanguageById, [id])), + ) + as _i10.Language); @override - _i15.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i15.Future<_i6.Exercise?>.value(), - ) as _i15.Future<_i6.Exercise?>); + _i15.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i15.Future<_i6.Exercise?>.value(), + ) + as _i15.Future<_i6.Exercise?>); @override _i15.Future<_i6.Exercise> handleUpdateExerciseFromApi( @@ -908,55 +625,42 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i15.Future<_i6.Exercise>.value(_FakeExercise_4( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i15.Future<_i6.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i15.Future<_i6.Exercise>.value( + _FakeExercise_4( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i15.Future<_i6.Exercise>); @override - _i15.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override _i15.Future setExercisesFromDatabase( @@ -964,64 +668,60 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future updateExerciseCache(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override _i15.Future> searchExercise( @@ -1030,50 +730,32 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i15.Future>.value(<_i6.Exercise>[]), - ) as _i15.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i15.Future>.value(<_i6.Exercise>[]), + ) + as _i15.Future>); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/exercises/exercises_detail_widget_test.mocks.dart b/test/exercises/exercises_detail_widget_test.mocks.dart index 425264a3..5c39de2b 100644 --- a/test/exercises/exercises_detail_widget_test.mocks.dart +++ b/test/exercises/exercises_detail_widget_test.mocks.dart @@ -32,73 +32,34 @@ import 'package:wger/providers/exercises.dart' as _i9; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase { - _FakeExerciseDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeExerciseCategory_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -110,292 +71,211 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i3.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_1( - this, - Invocation.getter(#database), - ), - ) as _i3.ExerciseDatabase); + _i3.ExerciseDatabase get database => + (super.noSuchMethod( + Invocation.getter(#database), + returnValue: _FakeExerciseDatabase_1(this, Invocation.getter(#database)), + ) + as _i3.ExerciseDatabase); @override - List<_i4.Exercise> get exercises => (super.noSuchMethod( - Invocation.getter(#exercises), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + List<_i4.Exercise> get exercises => + (super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i4.Exercise>[]) + as List<_i4.Exercise>); @override - List<_i4.Exercise> get filteredExercises => (super.noSuchMethod( - Invocation.getter(#filteredExercises), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + List<_i4.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[]) + as List<_i4.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i5.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i5.ExerciseCategory>[], - ) as List<_i5.ExerciseCategory>); + List<_i5.ExerciseCategory> get categories => + (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i5.ExerciseCategory>[]) + as List<_i5.ExerciseCategory>); @override - List<_i7.Muscle> get muscles => (super.noSuchMethod( - Invocation.getter(#muscles), - returnValue: <_i7.Muscle>[], - ) as List<_i7.Muscle>); + List<_i7.Muscle> get muscles => + (super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i7.Muscle>[]) + as List<_i7.Muscle>); @override - List<_i6.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i6.Equipment>[], - ) as List<_i6.Equipment>); + List<_i6.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i6.Equipment>[]) + as List<_i6.Equipment>); @override - List<_i8.Language> get languages => (super.noSuchMethod( - Invocation.getter(#languages), - returnValue: <_i8.Language>[], - ) as List<_i8.Language>); + List<_i8.Language> get languages => + (super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i8.Language>[]) + as List<_i8.Language>); @override - set database(_i3.ExerciseDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); + set database(_i3.ExerciseDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); @override - set exercises(List<_i4.Exercise>? value) => super.noSuchMethod( - Invocation.setter( - #exercises, - value, - ), - returnValueForMissingStub: null, - ); + set exercises(List<_i4.Exercise>? value) => + super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null); @override set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @override - set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), - returnValueForMissingStub: null, - ); + set languages(List<_i8.Language>? languages) => + super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i10.Future setFilters(_i9.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i10.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), - returnValue: _FakeExercise_2( - this, - Invocation.method( - #findExerciseById, - [id], - ), - ), - ) as _i4.Exercise); - - @override - List<_i4.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i10.Future setFilters(_i9.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_3( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i5.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_4( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i6.Equipment); + _i10.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_5( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i7.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_6( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i8.Language); + _i4.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_2(this, Invocation.method(#findExerciseById, [id])), + ) + as _i4.Exercise); @override - _i10.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + List<_i4.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i4.Exercise>[], + ) + as List<_i4.Exercise>); @override - _i10.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i5.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_3(this, Invocation.method(#findCategoryById, [id])), + ) + as _i5.ExerciseCategory); @override - _i10.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i6.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_4(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i6.Equipment); @override - _i10.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i7.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_5(this, Invocation.method(#findMuscleById, [id])), + ) + as _i7.Muscle); @override - _i10.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i8.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_6(this, Invocation.method(#findLanguageById, [id])), + ) + as _i8.Language); @override - _i10.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i10.Future<_i4.Exercise?>.value(), - ) as _i10.Future<_i4.Exercise?>); + _i10.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i10.Future<_i4.Exercise?>.value(), + ) + as _i10.Future<_i4.Exercise?>); @override _i10.Future<_i4.Exercise> handleUpdateExerciseFromApi( @@ -403,55 +283,42 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i10.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i10.Future<_i4.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i10.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i10.Future<_i4.Exercise>); @override - _i10.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setExercisesFromDatabase( @@ -459,64 +326,60 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future updateExerciseCache(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future> searchExercise( @@ -525,50 +388,32 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i10.Future>.value(<_i4.Exercise>[]), - ) as _i10.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i10.Future>.value(<_i4.Exercise>[]), + ) + as _i10.Future>); @override void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/nutrition/nutritional_plans_screen_test.mocks.dart b/test/nutrition/nutritional_plans_screen_test.mocks.dart index c1429fd5..5c63832f 100644 --- a/test/nutrition/nutritional_plans_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plans_screen_test.mocks.dart @@ -31,53 +31,24 @@ import 'package:wger/providers/base_provider.dart' as _i8; // ignore_for_file: invalid_use_of_internal_member 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 { - _FakeStreamedResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AuthProvider]. @@ -89,154 +60,102 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { } @override - Map get metadata => (super.noSuchMethod( - Invocation.getter(#metadata), - returnValue: {}, - ) as Map); + Map get metadata => + (super.noSuchMethod(Invocation.getter(#metadata), returnValue: {}) + as Map); @override - _i3.AuthState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i3.AuthState.updateRequired, - ) as _i3.AuthState); + _i3.AuthState get state => + (super.noSuchMethod(Invocation.getter(#state), returnValue: _i3.AuthState.updateRequired) + as _i3.AuthState); @override - _i2.Client get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeClient_0( - this, - Invocation.getter(#client), - ), - ) as _i2.Client); + _i2.Client get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_0(this, Invocation.getter(#client)), + ) + as _i2.Client); @override - bool get dataInit => (super.noSuchMethod( - Invocation.getter(#dataInit), - returnValue: false, - ) as bool); + bool get dataInit => + (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? value) => super.noSuchMethod( - Invocation.setter( - #token, - value, - ), - returnValueForMissingStub: null, - ); + set token(String? value) => + super.noSuchMethod(Invocation.setter(#token, value), returnValueForMissingStub: null); @override - set serverUrl(String? value) => super.noSuchMethod( - Invocation.setter( - #serverUrl, - value, - ), - returnValueForMissingStub: null, - ); + set serverUrl(String? value) => + super.noSuchMethod(Invocation.setter(#serverUrl, value), returnValueForMissingStub: null); @override - set serverVersion(String? value) => super.noSuchMethod( - Invocation.setter( - #serverVersion, - value, - ), - returnValueForMissingStub: null, - ); + set serverVersion(String? value) => + super.noSuchMethod(Invocation.setter(#serverVersion, value), returnValueForMissingStub: null); @override set applicationVersion(_i4.PackageInfo? value) => super.noSuchMethod( - Invocation.setter( - #applicationVersion, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#applicationVersion, value), + returnValueForMissingStub: null, + ); @override - set metadata(Map? value) => super.noSuchMethod( - Invocation.setter( - #metadata, - value, - ), - returnValueForMissingStub: null, - ); + set metadata(Map? value) => + super.noSuchMethod(Invocation.setter(#metadata, value), returnValueForMissingStub: null); @override - set state(_i3.AuthState? value) => super.noSuchMethod( - Invocation.setter( - #state, - value, - ), - returnValueForMissingStub: null, - ); + set state(_i3.AuthState? value) => + super.noSuchMethod(Invocation.setter(#state, value), returnValueForMissingStub: null); @override - set client(_i2.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); + set client(_i2.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); @override - set dataInit(bool? value) => super.noSuchMethod( - Invocation.setter( - #dataInit, - value, - ), - returnValueForMissingStub: null, - ); + set dataInit(bool? value) => + super.noSuchMethod(Invocation.setter(#dataInit, value), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i5.Future setServerVersion() => (super.noSuchMethod( - Invocation.method( - #setServerVersion, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setServerVersion() => + (super.noSuchMethod( + Invocation.method(#setServerVersion, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method( - #setApplicationVersion, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setApplicationVersion() => + (super.noSuchMethod( + Invocation.method(#setApplicationVersion, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future initVersions(String? serverUrl) => (super.noSuchMethod( - Invocation.method( - #initVersions, - [serverUrl], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future initVersions(String? serverUrl) => + (super.noSuchMethod( + Invocation.method(#initVersions, [serverUrl]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future applicationUpdateRequired([String? version]) => (super.noSuchMethod( - Invocation.method( - #applicationUpdateRequired, - [version], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future applicationUpdateRequired([String? version]) => + (super.noSuchMethod( + Invocation.method(#applicationUpdateRequired, [version]), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override _i5.Future<_i3.LoginActions> register({ @@ -247,19 +166,16 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { String? locale = 'en', }) => (super.noSuchMethod( - Invocation.method( - #register, - [], - { - #username: username, - #password: password, - #email: email, - #serverUrl: serverUrl, - #locale: locale, - }, - ), - returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), - ) as _i5.Future<_i3.LoginActions>); + Invocation.method(#register, [], { + #username: username, + #password: password, + #email: email, + #serverUrl: serverUrl, + #locale: locale, + }), + returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), + ) + as _i5.Future<_i3.LoginActions>); @override _i5.Future<_i3.LoginActions> login( @@ -269,104 +185,66 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { String? apiToken, ) => (super.noSuchMethod( - Invocation.method( - #login, - [ - username, - password, - serverUrl, - apiToken, - ], - ), - returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), - ) as _i5.Future<_i3.LoginActions>); + Invocation.method(#login, [username, password, serverUrl, apiToken]), + returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), + ) + as _i5.Future<_i3.LoginActions>); @override - _i5.Future getServerUrlFromPrefs() => (super.noSuchMethod( - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - )), - ) as _i5.Future); + _i5.Future getServerUrlFromPrefs() => + (super.noSuchMethod( + Invocation.method(#getServerUrlFromPrefs, []), + returnValue: _i5.Future.value( + _i6.dummyValue(this, Invocation.method(#getServerUrlFromPrefs, [])), + ), + ) + as _i5.Future); @override - _i5.Future tryAutoLogin() => (super.noSuchMethod( - Invocation.method( - #tryAutoLogin, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future tryAutoLogin() => + (super.noSuchMethod( + Invocation.method(#tryAutoLogin, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future logout({bool? shouldNotify = true}) => (super.noSuchMethod( - Invocation.method( - #logout, - [], - {#shouldNotify: shouldNotify}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future logout({bool? shouldNotify = true}) => + (super.noSuchMethod( + Invocation.method(#logout, [], {#shouldNotify: shouldNotify}), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - String getAppNameHeader() => (super.noSuchMethod( - Invocation.method( - #getAppNameHeader, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #getAppNameHeader, - [], - ), - ), - ) as String); + String getAppNameHeader() => + (super.noSuchMethod( + Invocation.method(#getAppNameHeader, []), + returnValue: _i6.dummyValue(this, Invocation.method(#getAppNameHeader, [])), + ) + as String); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } /// A class which mocks [WgerBaseProvider]. @@ -378,156 +256,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { } @override - _i3.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_1( - this, - Invocation.getter(#auth), - ), - ) as _i3.AuthProvider); - - @override - _i2.Client get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeClient_0( - this, - Invocation.getter(#client), - ), - ) as _i2.Client); - - @override - set auth(_i3.AuthProvider? value) => super.noSuchMethod( - Invocation.setter( - #auth, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set client(_i2.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i3.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_1(this, Invocation.getter(#auth)), + ) + as _i3.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i2.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_0(this, Invocation.getter(#client)), + ) + as _i2.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i3.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i2.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i2.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i2.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i2.Response>); } /// A class which mocks [Client]. @@ -539,46 +358,24 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i5.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})), + ), + ) + as _i5.Future<_i2.Response>); @override - _i5.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> post( @@ -588,28 +385,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> put( @@ -619,28 +407,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> patch( @@ -650,28 +429,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> delete( @@ -681,85 +451,53 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override - _i5.Future read( - Uri? url, { - Map? headers, - }) => + _i5.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i5.Future.value( + _i6.dummyValue(this, Invocation.method(#read, [url], {#headers: headers})), + ), + ) + as _i5.Future); @override - _i5.Future<_i10.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), - ) as _i5.Future<_i10.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), + ) + as _i5.Future<_i10.Uint8List>); @override - _i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i5.Future<_i2.StreamedResponse>); + _i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method(#send, [request]), + returnValue: _i5.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_4(this, Invocation.method(#send, [request])), + ), + ) + as _i5.Future<_i2.StreamedResponse>); @override - void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValueForMissingStub: null, - ); + void close() => + super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null); } diff --git a/test/routine/day_form_test.mocks.dart b/test/routine/day_form_test.mocks.dart index 4df7295b..211c521f 100644 --- a/test/routine/day_form_test.mocks.dart +++ b/test/routine/day_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/forms/session_form_test.mocks.dart b/test/routine/forms/session_form_test.mocks.dart index f6c5b483..c167ffaa 100644 --- a/test/routine/forms/session_form_test.mocks.dart +++ b/test/routine/forms/session_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/gym_mode_screen_test.mocks.dart b/test/routine/gym_mode_screen_test.mocks.dart index 0e3e3ea4..468c5600 100644 --- a/test/routine/gym_mode_screen_test.mocks.dart +++ b/test/routine/gym_mode_screen_test.mocks.dart @@ -46,203 +46,88 @@ import 'package:wger/providers/routines.dart' as _i23; // ignore_for_file: invalid_use_of_internal_member 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 { - _FakeWgerBaseProvider_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWgerBaseProvider_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase { - _FakeExerciseDatabase_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeExerciseCategory_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_18( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -254,156 +139,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), - ) as _i3.Client); - - @override - set auth(_i2.AuthProvider? value) => super.noSuchMethod( - Invocation.setter( - #auth, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i20.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i20.Future>.value([]), - ) as _i20.Future>); - - @override - _i20.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i20.Future>.value({}), - ) as _i20.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i20.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i20.Future>.value({}), - ) as _i20.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i20.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i20.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i20.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i20.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i20.Future>.value([]), + ) + as _i20.Future>); + + @override + _i20.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i20.Future>.value({}), + ) + as _i20.Future>); + + @override + _i20.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i20.Future>.value({}), + ) + as _i20.Future>); + + @override + _i20.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i20.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i20.Future<_i3.Response>); } /// A class which mocks [ExercisesProvider]. @@ -415,292 +241,211 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { } @override - _i4.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_4( - this, - Invocation.getter(#baseProvider), - ), - ) as _i4.WgerBaseProvider); + _i4.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)), + ) + as _i4.WgerBaseProvider); @override - _i5.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_5( - this, - Invocation.getter(#database), - ), - ) as _i5.ExerciseDatabase); + _i5.ExerciseDatabase get database => + (super.noSuchMethod( + Invocation.getter(#database), + returnValue: _FakeExerciseDatabase_5(this, Invocation.getter(#database)), + ) + as _i5.ExerciseDatabase); @override - List<_i6.Exercise> get exercises => (super.noSuchMethod( - Invocation.getter(#exercises), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get exercises => + (super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - List<_i6.Exercise> get filteredExercises => (super.noSuchMethod( - Invocation.getter(#filteredExercises), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i7.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i7.ExerciseCategory>[], - ) as List<_i7.ExerciseCategory>); + List<_i7.ExerciseCategory> get categories => + (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i7.ExerciseCategory>[]) + as List<_i7.ExerciseCategory>); @override - List<_i9.Muscle> get muscles => (super.noSuchMethod( - Invocation.getter(#muscles), - returnValue: <_i9.Muscle>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get muscles => + (super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i9.Muscle>[]) + as List<_i9.Muscle>); @override - List<_i8.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i8.Equipment>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[]) + as List<_i8.Equipment>); @override - List<_i10.Language> get languages => (super.noSuchMethod( - Invocation.getter(#languages), - returnValue: <_i10.Language>[], - ) as List<_i10.Language>); + List<_i10.Language> get languages => + (super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i10.Language>[]) + as List<_i10.Language>); @override - set database(_i5.ExerciseDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); + set database(_i5.ExerciseDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); @override - set exercises(List<_i6.Exercise>? value) => super.noSuchMethod( - Invocation.setter( - #exercises, - value, - ), - returnValueForMissingStub: null, - ); + set exercises(List<_i6.Exercise>? value) => + super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null); @override set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @override - set languages(List<_i10.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), - returnValueForMissingStub: null, - ); + set languages(List<_i10.Language>? languages) => + super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i20.Future setFilters(_i21.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i20.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i6.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), - returnValue: _FakeExercise_6( - this, - Invocation.method( - #findExerciseById, - [id], - ), - ), - ) as _i6.Exercise); - - @override - List<_i6.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i20.Future setFilters(_i21.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_7( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i7.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_8( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i8.Equipment); + _i20.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_9( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i9.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_10( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i10.Language); + _i6.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_6(this, Invocation.method(#findExerciseById, [id])), + ) + as _i6.Exercise); @override - _i20.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i6.Exercise>[], + ) + as List<_i6.Exercise>); @override - _i20.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i7.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_7(this, Invocation.method(#findCategoryById, [id])), + ) + as _i7.ExerciseCategory); @override - _i20.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i8.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_8(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i8.Equipment); @override - _i20.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i9.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_9(this, Invocation.method(#findMuscleById, [id])), + ) + as _i9.Muscle); @override - _i20.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i10.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_10(this, Invocation.method(#findLanguageById, [id])), + ) + as _i10.Language); @override - _i20.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i20.Future<_i6.Exercise?>.value(), - ) as _i20.Future<_i6.Exercise?>); + _i20.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i20.Future<_i6.Exercise?>.value(), + ) + as _i20.Future<_i6.Exercise?>); @override _i20.Future<_i6.Exercise> handleUpdateExerciseFromApi( @@ -708,55 +453,42 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i20.Future<_i6.Exercise>.value(_FakeExercise_6( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i20.Future<_i6.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i20.Future<_i6.Exercise>.value( + _FakeExercise_6( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i20.Future<_i6.Exercise>); @override - _i20.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override _i20.Future setExercisesFromDatabase( @@ -764,64 +496,60 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future updateExerciseCache(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override _i20.Future> searchExercise( @@ -830,52 +558,34 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i20.Future>.value(<_i6.Exercise>[]), - ) as _i20.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i20.Future>.value(<_i6.Exercise>[]), + ) + as _i20.Future>); @override void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } /// A class which mocks [RoutinesProvider]. @@ -887,174 +597,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider { } @override - _i4.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_4( - this, - Invocation.getter(#baseProvider), - ), - ) as _i4.WgerBaseProvider); + _i4.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)), + ) + as _i4.WgerBaseProvider); @override - List<_i13.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i13.Routine>[], - ) as List<_i13.Routine>); + List<_i13.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i13.Routine>[]) + as List<_i13.Routine>); @override - List<_i11.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i11.WeightUnit>[], - ) as List<_i11.WeightUnit>); + List<_i11.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i11.WeightUnit>[]) + as List<_i11.WeightUnit>); @override - _i11.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_11( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i11.WeightUnit); + _i11.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_11(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i11.WeightUnit); @override - List<_i12.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i12.RepetitionUnit>[], - ) as List<_i12.RepetitionUnit>); + List<_i12.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i12.RepetitionUnit>[]) + as List<_i12.RepetitionUnit>); @override - _i12.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_12( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i12.RepetitionUnit); + _i12.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_12(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i12.RepetitionUnit); @override - set activeRoutine(_i13.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i13.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i11.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i12.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i11.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_11( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i11.WeightUnit); + _i11.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_11(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i11.WeightUnit); @override - _i12.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_12( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i12.RepetitionUnit); + _i12.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_12( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i12.RepetitionUnit); @override - List<_i13.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i13.Routine>[], - ) as List<_i13.Routine>); + List<_i13.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i13.Routine>[]) + as List<_i13.Routine>); @override - _i13.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_13( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i13.Routine); + _i13.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_13(this, Invocation.method(#findById, [id])), + ) + as _i13.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i20.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override _i20.Future setExercisesAndUnits( @@ -1062,505 +719,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i20.Future<_i13.Routine>); - - @override - _i20.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i20.Future<_i13.Routine>); - - @override - _i20.Future<_i13.Routine> addRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i20.Future<_i13.Routine>); - - @override - _i20.Future editRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future<_i14.Day> addDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i20.Future<_i14.Day>.value(_FakeDay_14( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i20.Future<_i14.Day>); - - @override - _i20.Future editDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future editDays(List<_i14.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future<_i15.Slot> addSlot( - _i15.Slot? slot, - int? routineId, - ) => + _i20.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i20.Future<_i15.Slot>.value(_FakeSlot_15( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i20.Future<_i15.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i20.Future<_i13.Routine>.value( + _FakeRoutine_13(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i20.Future<_i13.Routine>); @override - _i20.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i20.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i20.Future<_i13.Routine>.value( + _FakeRoutine_13(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i20.Future<_i13.Routine>); @override - _i20.Future editSlot( - _i15.Slot? slot, - int? routineId, - ) => + _i20.Future<_i13.Routine> addRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i20.Future<_i13.Routine>.value( + _FakeRoutine_13(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i20.Future<_i13.Routine>); @override - _i20.Future editSlots( - List<_i15.Slot>? slots, - int? routineId, - ) => + _i20.Future editRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i16.SlotEntry> addSlotEntry( - _i16.SlotEntry? entry, - int? routineId, - ) => + _i20.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i20.Future<_i16.SlotEntry>.value(_FakeSlotEntry_16( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i20.Future<_i16.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i20.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future editSlotEntry( - _i16.SlotEntry? entry, - int? routineId, - ) => + _i20.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - String getConfigUrl(_i16.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i25.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i20.Future<_i17.BaseConfig> editConfig( - _i17.BaseConfig? config, - _i16.ConfigType? type, - ) => + _i20.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i20.Future<_i17.BaseConfig>.value(_FakeBaseConfig_17( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i20.Future<_i17.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i17.BaseConfig> addConfig( - _i17.BaseConfig? config, - _i16.ConfigType? type, - ) => + _i20.Future<_i14.Day> addDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i20.Future<_i17.BaseConfig>.value(_FakeBaseConfig_17( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i20.Future<_i17.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i20.Future<_i14.Day>.value( + _FakeDay_14(this, Invocation.method(#addDay, [day])), + ), + ) + as _i20.Future<_i14.Day>); @override - _i20.Future deleteConfig( - int? id, - _i16.ConfigType? type, - ) => + _i20.Future editDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#editDay, [day]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future handleConfig( - _i16.SlotEntry? entry, - num? value, - _i16.ConfigType? type, - ) => + _i20.Future editDays(List<_i14.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#editDays, [days]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i20.Future>.value(<_i18.WorkoutSession>[]), - ) as _i20.Future>); - - @override - _i20.Future<_i18.WorkoutSession> addSession( - _i18.WorkoutSession? session, - int? routineId, - ) => + _i20.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i20.Future<_i18.WorkoutSession>.value(_FakeWorkoutSession_18( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i20.Future<_i18.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i18.WorkoutSession> editSession(_i18.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i20.Future<_i18.WorkoutSession>.value(_FakeWorkoutSession_18( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i20.Future<_i18.WorkoutSession>); - - @override - _i20.Future<_i19.Log> addLog(_i19.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i20.Future<_i19.Log>.value(_FakeLog_19( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i20.Future<_i19.Log>); - - @override - _i20.Future deleteLog( - int? logId, - int? routineId, - ) => + _i20.Future<_i15.Slot> addSlot(_i15.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i20.Future<_i15.Slot>.value( + _FakeSlot_15(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i20.Future<_i15.Slot>); + + @override + _i20.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future editSlot(_i15.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future editSlots(List<_i15.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future<_i16.SlotEntry> addSlotEntry(_i16.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i20.Future<_i16.SlotEntry>.value( + _FakeSlotEntry_16(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i20.Future<_i16.SlotEntry>); + + @override + _i20.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future editSlotEntry(_i16.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + String getConfigUrl(_i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i25.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i20.Future<_i17.BaseConfig> editConfig(_i17.BaseConfig? config, _i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i20.Future<_i17.BaseConfig>.value( + _FakeBaseConfig_17(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i20.Future<_i17.BaseConfig>); + + @override + _i20.Future<_i17.BaseConfig> addConfig(_i17.BaseConfig? config, _i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i20.Future<_i17.BaseConfig>.value( + _FakeBaseConfig_17(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i20.Future<_i17.BaseConfig>); + + @override + _i20.Future deleteConfig(int? id, _i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future handleConfig(_i16.SlotEntry? entry, num? value, _i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i20.Future>.value(<_i18.WorkoutSession>[]), + ) + as _i20.Future>); + + @override + _i20.Future<_i18.WorkoutSession> addSession(_i18.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i20.Future<_i18.WorkoutSession>.value( + _FakeWorkoutSession_18(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i20.Future<_i18.WorkoutSession>); + + @override + _i20.Future<_i18.WorkoutSession> editSession(_i18.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i20.Future<_i18.WorkoutSession>.value( + _FakeWorkoutSession_18(this, Invocation.method(#editSession, [session])), + ), + ) + as _i20.Future<_i18.WorkoutSession>); + + @override + _i20.Future<_i19.Log> addLog(_i19.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i20.Future<_i19.Log>.value( + _FakeLog_19(this, Invocation.method(#addLog, [log])), + ), + ) + as _i20.Future<_i19.Log>); + + @override + _i20.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/gym_mode_session_screen_test.mocks.dart b/test/routine/gym_mode_session_screen_test.mocks.dart index 78725bf3..05bb0ba5 100644 --- a/test/routine/gym_mode_session_screen_test.mocks.dart +++ b/test/routine/gym_mode_session_screen_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/repetition_unit_form_widget_test.mocks.dart b/test/routine/repetition_unit_form_widget_test.mocks.dart index 6c6fde11..7294923b 100644 --- a/test/routine/repetition_unit_form_widget_test.mocks.dart +++ b/test/routine/repetition_unit_form_widget_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/routine_edit_screen_test.mocks.dart b/test/routine/routine_edit_screen_test.mocks.dart index 5a48f35d..26ed8b10 100644 --- a/test/routine/routine_edit_screen_test.mocks.dart +++ b/test/routine/routine_edit_screen_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/routine_edit_test.mocks.dart b/test/routine/routine_edit_test.mocks.dart index b182db36..11e15eb9 100644 --- a/test/routine/routine_edit_test.mocks.dart +++ b/test/routine/routine_edit_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/routine_form_test.mocks.dart b/test/routine/routine_form_test.mocks.dart index bce93593..84648c71 100644 --- a/test/routine/routine_form_test.mocks.dart +++ b/test/routine/routine_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/routine_logs_screen_test.mocks.dart b/test/routine/routine_logs_screen_test.mocks.dart index 365fec88..24560f3c 100644 --- a/test/routine/routine_logs_screen_test.mocks.dart +++ b/test/routine/routine_logs_screen_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/routine_screen_test.mocks.dart b/test/routine/routine_screen_test.mocks.dart index eaa9d719..73f33eef 100644 --- a/test/routine/routine_screen_test.mocks.dart +++ b/test/routine/routine_screen_test.mocks.dart @@ -26,43 +26,19 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: invalid_use_of_internal_member 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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), - ) as _i3.Client); - - @override - set auth(_i2.AuthProvider? value) => super.noSuchMethod( - Invocation.setter( - #auth, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/routine/routines_screen_test.mocks.dart b/test/routine/routines_screen_test.mocks.dart index 29154394..48952b88 100644 --- a/test/routine/routines_screen_test.mocks.dart +++ b/test/routine/routines_screen_test.mocks.dart @@ -26,43 +26,19 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: invalid_use_of_internal_member 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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), - ) as _i3.Client); - - @override - set auth(_i2.AuthProvider? value) => super.noSuchMethod( - Invocation.setter( - #auth, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/routine/slot_entry_form_test.mocks.dart b/test/routine/slot_entry_form_test.mocks.dart index d0a17c54..c9606827 100644 --- a/test/routine/slot_entry_form_test.mocks.dart +++ b/test/routine/slot_entry_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/routine/weight_unit_form_widget_test.mocks.dart b/test/routine/weight_unit_form_widget_test.mocks.dart index 6b8d818f..c862b9ac 100644 --- a/test/routine/weight_unit_form_widget_test.mocks.dart +++ b/test/routine/weight_unit_form_widget_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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 { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _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]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i5.Routine> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod( - Invocation.getter(#weightUnits), - returnValue: <_i3.WeightUnit>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[]) + as List<_i3.WeightUnit>); @override - _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( - Invocation.getter(#defaultWeightUnit), - returnValue: _FakeWeightUnit_1( - this, - Invocation.getter(#defaultWeightUnit), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)), + ) + as _i3.WeightUnit); @override - List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod( - Invocation.getter(#repetitionUnits), - returnValue: <_i4.RepetitionUnit>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[]) + as List<_i4.RepetitionUnit>); @override - _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( - Invocation.getter(#defaultRepetitionUnit), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.getter(#defaultRepetitionUnit), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)), + ) + as _i4.RepetitionUnit); @override - set activeRoutine(_i5.Routine? value) => super.noSuchMethod( - Invocation.setter( - #activeRoutine, - value, - ), - returnValueForMissingStub: null, - ); + set activeRoutine(_i5.Routine? value) => + super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null); @override set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[]) + as List<_i5.Routine>); @override - _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeRoutine_3( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])), + ) + as _i5.Routine); @override - int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), - returnValue: 0, - ) as int); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSlotEntry, [entry, routineId]), + returnValue: _i13.Future<_i8.SlotEntry>.value( + _FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#editConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#addConfig, [config, type]), + returnValue: _i13.Future<_i9.BaseConfig>.value( + _FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) => + (super.noSuchMethod( + Invocation.method(#addSession, [session, routineId]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } diff --git a/test/weight/weight_screen_test.mocks.dart b/test/weight/weight_screen_test.mocks.dart index f0fb8ed9..264480d6 100644 --- a/test/weight/weight_screen_test.mocks.dart +++ b/test/weight/weight_screen_test.mocks.dart @@ -37,83 +37,39 @@ import 'package:wger/providers/user.dart' as _i13; // ignore_for_file: invalid_use_of_internal_member class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { - _FakeWgerBaseProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry { - _FakeWeightEntry_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightEntry_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake implements _i4.SharedPreferencesAsync { - _FakeSharedPreferencesAsync_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSharedPreferencesAsync_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeIngredientDatabase_3 extends _i1.SmartFake implements _i5.IngredientDatabase { - _FakeIngredientDatabase_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredientDatabase_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeNutritionalPlan_4 extends _i1.SmartFake implements _i6.NutritionalPlan { - _FakeNutritionalPlan_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNutritionalPlan_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMeal_5 extends _i1.SmartFake implements _i7.Meal { - _FakeMeal_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMeal_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMealItem_6 extends _i1.SmartFake implements _i8.MealItem { - _FakeMealItem_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMealItem_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredient_7 extends _i1.SmartFake implements _i9.Ingredient { - _FakeIngredient_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredient_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [BodyWeightProvider]. @@ -125,144 +81,97 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i3.WeightEntry> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i3.WeightEntry>[], - ) as List<_i3.WeightEntry>); + List<_i3.WeightEntry> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i3.WeightEntry>[]) + as List<_i3.WeightEntry>); @override - set items(List<_i3.WeightEntry>? entries) => super.noSuchMethod( - Invocation.setter( - #items, - entries, - ), - returnValueForMissingStub: null, - ); + set items(List<_i3.WeightEntry>? entries) => + super.noSuchMethod(Invocation.setter(#items, entries), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i3.WeightEntry findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeWeightEntry_1( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i3.WeightEntry); + _i3.WeightEntry findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeWeightEntry_1(this, Invocation.method(#findById, [id])), + ) + as _i3.WeightEntry); @override - _i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method( - #findByDate, - [date], - )) as _i3.WeightEntry?); + _i3.WeightEntry? findByDate(DateTime? date) => + (super.noSuchMethod(Invocation.method(#findByDate, [date])) as _i3.WeightEntry?); @override - _i11.Future> fetchAndSetEntries() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEntries, - [], - ), - returnValue: _i11.Future>.value(<_i3.WeightEntry>[]), - ) as _i11.Future>); + _i11.Future> fetchAndSetEntries() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEntries, []), + returnValue: _i11.Future>.value(<_i3.WeightEntry>[]), + ) + as _i11.Future>); @override - _i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #addEntry, - [entry], - ), - returnValue: _i11.Future<_i3.WeightEntry>.value(_FakeWeightEntry_1( - this, - Invocation.method( - #addEntry, - [entry], - ), - )), - ) as _i11.Future<_i3.WeightEntry>); + _i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => + (super.noSuchMethod( + Invocation.method(#addEntry, [entry]), + returnValue: _i11.Future<_i3.WeightEntry>.value( + _FakeWeightEntry_1(this, Invocation.method(#addEntry, [entry])), + ), + ) + as _i11.Future<_i3.WeightEntry>); @override - _i11.Future editEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #editEntry, - [entry], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future editEntry(_i3.WeightEntry? entry) => + (super.noSuchMethod( + Invocation.method(#editEntry, [entry]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future deleteEntry(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteEntry, - [id], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future deleteEntry(int? id) => + (super.noSuchMethod( + Invocation.method(#deleteEntry, [id]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } /// A class which mocks [UserProvider]. @@ -274,145 +183,96 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider { } @override - _i14.ThemeMode get themeMode => (super.noSuchMethod( - Invocation.getter(#themeMode), - returnValue: _i14.ThemeMode.system, - ) as _i14.ThemeMode); + _i14.ThemeMode get themeMode => + (super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i14.ThemeMode.system) + as _i14.ThemeMode); @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i4.SharedPreferencesAsync get prefs => (super.noSuchMethod( - Invocation.getter(#prefs), - returnValue: _FakeSharedPreferencesAsync_2( - this, - Invocation.getter(#prefs), - ), - ) as _i4.SharedPreferencesAsync); + _i4.SharedPreferencesAsync get prefs => + (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakeSharedPreferencesAsync_2(this, Invocation.getter(#prefs)), + ) + as _i4.SharedPreferencesAsync); @override - set themeMode(_i14.ThemeMode? value) => super.noSuchMethod( - Invocation.setter( - #themeMode, - value, - ), - returnValueForMissingStub: null, - ); + set themeMode(_i14.ThemeMode? value) => + super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null); @override - set prefs(_i4.SharedPreferencesAsync? value) => super.noSuchMethod( - Invocation.setter( - #prefs, - value, - ), - returnValueForMissingStub: null, - ); + set prefs(_i4.SharedPreferencesAsync? value) => + super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null); @override - set profile(_i15.Profile? value) => super.noSuchMethod( - Invocation.setter( - #profile, - value, - ), - returnValueForMissingStub: null, - ); + set profile(_i15.Profile? value) => + super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - void setThemeMode(_i14.ThemeMode? mode) => super.noSuchMethod( - Invocation.method( - #setThemeMode, - [mode], - ), - returnValueForMissingStub: null, - ); + void setThemeMode(_i14.ThemeMode? mode) => + super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null); @override - _i11.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetProfile() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future saveProfile() => + (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future verifyEmail() => + (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); } /// A class which mocks [NutritionPlansProvider]. @@ -424,268 +284,181 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); - - @override - _i5.IngredientDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeIngredientDatabase_3( - this, - Invocation.getter(#database), - ), - ) as _i5.IngredientDatabase); - - @override - List<_i9.Ingredient> get ingredients => (super.noSuchMethod( - Invocation.getter(#ingredients), - returnValue: <_i9.Ingredient>[], - ) as List<_i9.Ingredient>); - - @override - List<_i6.NutritionalPlan> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i6.NutritionalPlan>[], - ) as List<_i6.NutritionalPlan>); - - @override - set database(_i5.IngredientDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set ingredients(List<_i9.Ingredient>? value) => super.noSuchMethod( - Invocation.setter( - #ingredients, - value, - ), - returnValueForMissingStub: null, - ); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i6.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeNutritionalPlan_4( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i6.NutritionalPlan); - - @override - _i7.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i7.Meal?); - - @override - _i11.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - )), - ) as _i11.Future<_i6.NutritionalPlan>); - - @override - _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - )), - ) as _i11.Future<_i6.NutritionalPlan>); - - @override - _i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4( - this, - Invocation.method( - #addPlan, - [planData], - ), - )), - ) as _i11.Future<_i6.NutritionalPlan>); - - @override - _i11.Future editPlan(_i6.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future<_i7.Meal> addMeal( - _i7.Meal? meal, - int? planId, - ) => + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - returnValue: _i11.Future<_i7.Meal>.value(_FakeMeal_5( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), - ) as _i11.Future<_i7.Meal>); + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i11.Future<_i7.Meal> editMeal(_i7.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], - ), - returnValue: _i11.Future<_i7.Meal>.value(_FakeMeal_5( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i11.Future<_i7.Meal>); - - @override - _i11.Future deleteMeal(_i7.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future<_i8.MealItem> addMealItem( - _i8.MealItem? mealItem, - _i7.Meal? meal, - ) => + _i5.IngredientDatabase get database => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i11.Future<_i8.MealItem>.value(_FakeMealItem_6( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - )), - ) as _i11.Future<_i8.MealItem>); + Invocation.getter(#database), + returnValue: _FakeIngredientDatabase_3(this, Invocation.getter(#database)), + ) + as _i5.IngredientDatabase); @override - _i11.Future deleteMealItem(_i8.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + List<_i9.Ingredient> get ingredients => + (super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i9.Ingredient>[]) + as List<_i9.Ingredient>); @override - _i11.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + List<_i6.NutritionalPlan> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i6.NutritionalPlan>[]) + as List<_i6.NutritionalPlan>); + + @override + set database(_i5.IngredientDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); + + @override + set ingredients(List<_i9.Ingredient>? value) => + super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + + @override + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + + @override + _i6.NutritionalPlan findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeNutritionalPlan_4(this, Invocation.method(#findById, [id])), + ) + as _i6.NutritionalPlan); + + @override + _i7.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i7.Meal?); + + @override + _i11.Future fetchAndSetAllPlansSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future fetchAndSetAllPlansFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanSparse, [planId])), + ), + ) + as _i11.Future<_i6.NutritionalPlan>); + + @override + _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanFull, [planId])), + ), + ) + as _i11.Future<_i6.NutritionalPlan>); + + @override + _i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) => + (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4(this, Invocation.method(#addPlan, [planData])), + ), + ) + as _i11.Future<_i6.NutritionalPlan>); + + @override + _i11.Future editPlan(_i6.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future deletePlan(int? id) => + (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i7.Meal> addMeal(_i7.Meal? meal, int? planId) => + (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i11.Future<_i7.Meal>.value( + _FakeMeal_5(this, Invocation.method(#addMeal, [meal, planId])), + ), + ) + as _i11.Future<_i7.Meal>); + + @override + _i11.Future<_i7.Meal> editMeal(_i7.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i11.Future<_i7.Meal>.value( + _FakeMeal_5(this, Invocation.method(#editMeal, [meal])), + ), + ) + as _i11.Future<_i7.Meal>); + + @override + _i11.Future deleteMeal(_i7.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i8.MealItem> addMealItem(_i8.MealItem? mealItem, _i7.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i11.Future<_i8.MealItem>.value( + _FakeMealItem_6(this, Invocation.method(#addMealItem, [mealItem, meal])), + ), + ) + as _i11.Future<_i8.MealItem>); + + @override + _i11.Future deleteMealItem(_i8.MealItem? mealItem) => + (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future clearIngredientCache() => + (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future<_i9.Ingredient> fetchIngredient( @@ -693,30 +466,24 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans _i5.IngredientDatabase? database, }) => (super.noSuchMethod( - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - returnValue: _i11.Future<_i9.Ingredient>.value(_FakeIngredient_7( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - )), - ) as _i11.Future<_i9.Ingredient>); + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + returnValue: _i11.Future<_i9.Ingredient>.value( + _FakeIngredient_7( + this, + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + ), + ), + ) + as _i11.Future<_i9.Ingredient>); @override - _i11.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchIngredientsFromCache() => + (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future> searchIngredient( @@ -725,42 +492,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchIngredient, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i11.Future>.value(<_i9.Ingredient>[]), - ) as _i11.Future>); + Invocation.method( + #searchIngredient, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i11.Future>.value(<_i9.Ingredient>[]), + ) + as _i11.Future>); @override - _i11.Future<_i9.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithBarcode, - [barcode], - ), - returnValue: _i11.Future<_i9.Ingredient?>.value(), - ) as _i11.Future<_i9.Ingredient?>); - - @override - _i11.Future logMealToDiary( - _i7.Meal? meal, - DateTime? mealDateTime, - ) => + _i11.Future<_i9.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [ - meal, - mealDateTime, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method(#searchIngredientWithBarcode, [barcode]), + returnValue: _i11.Future<_i9.Ingredient?>.value(), + ) + as _i11.Future<_i9.Ingredient?>); + + @override + _i11.Future logMealToDiary(_i7.Meal? meal, DateTime? mealDateTime) => + (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal, mealDateTime]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future logIngredientToDiary( @@ -769,78 +525,47 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future deleteLog( - int? logId, - int? planId, - ) => + _i11.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetLogs(_i6.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetLogs(_i6.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + void dispose() => + super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + void notifyListeners() => + super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); }